Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220365 - app-misc/mc-4.6.1_pre1 fails to build with USE unicode(?)
Summary: app-misc/mc-4.6.1_pre1 fails to build with USE unicode(?)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-05 13:54 UTC by Markus Duft (RETIRED)
Modified: 2009-08-02 14:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
mc-4.6.2_pre1 with USE="unicode" (mc-4.6.2_pre1.ebuild,2.12 KB, text/plain)
2008-05-05 16:42 UTC, Samuli Suominen (RETIRED)
Details
log files, new ebuild, and all my modifications... (logs.tgz,28.13 KB, text/plain)
2008-05-06 08:35 UTC, Markus Duft (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Duft (RETIRED) gentoo-dev 2008-05-05 13:54:38 UTC
Hmm... what happened to gentoo beeing all about choices? why have all options on how to build app-misc/mc been removed?

i have problems building mc with the "default" configuration that is suddenly hard-wired in the ebuild. is there a reason for this? why can't i build the ncurses version?

the problems i'm seeing is, that SLang_TT_Read_FD is undefined in src/key.c. it is defined in slang.h with an ifdef:

1357 #ifdef REAL_UNIX_SYSTEM
1358 SL_EXTERN int SLang_TT_Baud_Rate;
1359 SL_EXTERN int SLang_TT_Read_FD;
1360 #else

since im obviously _not_ on a "real unix system", this doesn't work... Any suggestions?
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2008-05-05 14:42:48 UTC
Markus, mc is without a maintainer.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 15:59:12 UTC
(In reply to comment #1)
> Markus, mc is without a maintainer.
> 

Please use metadata.xml when assigning bugs.

(In reply to comment #0)
> i have problems building mc with the "default" configuration that is suddenly
> hard-wired in the ebuild. is there a reason for this? why can't i build the
> ncurses version?

Simple reason, because I haven't tried downgrading latest version into non-unicode version yet. I was kind of waiting for a request, like this.

> the problems i'm seeing is, that SLang_TT_Read_FD is undefined in src/key.c. it
> is defined in slang.h with an ifdef:
> 
> 1357 #ifdef REAL_UNIX_SYSTEM
> 1358 SL_EXTERN int SLang_TT_Baud_Rate;
> 1359 SL_EXTERN int SLang_TT_Read_FD;
> 1360 #else

It does,

#if defined(unix) || defined(__unix)
# ifndef __unix__
#  define __unix__ 1
# endif
#endif

#if !defined(__GO32__)
# ifdef __unix__
#  define REAL_UNIX_SYSTEM
# endif
#endif
> 
> since im obviously _not_ on a "real unix system", this doesn't work... Any
> suggestions?
> 

Sure,

build.log, emerge -pv slang

Would love to reproduce this.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 16:25:46 UTC
Tried 4.6.2_pre1 with --with-screen=ncurses which didn't go so well,

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -pipe -march=k8 -c editcmd.c
edit.c: In function ‘edit_load_position’:
edit.c:554: error: ‘WEdit’ has no member named ‘charpoint’
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 16:33:01 UTC
(In reply to comment #3)
> Tried 4.6.2_pre1 with --with-screen=ncurses which didn't go so well,
> 
> x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include   -O2 -pipe -march=k8 -c editcmd.c
> edit.c: In function ‘edit_load_position’:
> edit.c:554: error: ‘WEdit’ has no member named ‘charpoint’
> 

Or with --with-screen=ncurses --without-edit,

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..  -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/libexec/mc"\"  -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -pipe -march=k8 -c screen.c
screen.c: In function ‘do_search’:
screen.c:2066: error: ‘mbstate_t’ undeclared (first use in this function)
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 16:42:42 UTC
Created attachment 151951 [details]
mc-4.6.2_pre1 with USE="unicode"

Try this. Conditional patching; ugly, but working.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 17:12:56 UTC
(In reply to comment #5)
> Created an attachment (id=151951) [edit]
> mc-4.6.2_pre1 with USE="unicode"
> 
> Try this. Conditional patching; ugly, but working.
> 

+  05 May 2008; Samuli Suominen <drac@gentoo.org> mc-4.6.2_pre1.ebuild:
+  USE unicode wrt #220365

One issue down, still need the build.log/emerge --info/emerge -pv slang to figure out why it's failing to build for you with unicode support.
Comment 7 Jan Kundrát (RETIRED) gentoo-dev 2008-05-05 17:33:49 UTC
(In reply to comment #2)
> Please use metadata.xml when assigning bugs.

Meh, you don't expect me to update my copy every eight hours, do you. Thanks for stepping up as a maintainer.
Comment 8 Markus Duft (RETIRED) gentoo-dev 2008-05-06 08:35:25 UTC
Created attachment 152077 [details]
log files, new ebuild, and all my modifications...

ok, i have an emerge --info and a build log for slang (it compiles, but... i'm on windows, so this is more than experimental...) and mc. the slang-interix patch just fixes a compile issue, since _XOPEN_SOURCE_EXTENDED is not defined here:

 8 -# define _XOPEN_SOURCE_EXTENDED
 9 +# define _XOPEN_SOURCE_EXTENDED 0

(the check #if (_XOPEN_SOURCE_EXTENDED==1) broke compile, since it just was defined empty)

the interix patch for mc makes it handle mounted file system lists correctly, but does not change anything else, so it's also not interesting here. More interesting is, that the ebuild got an eautoreconf here, because of the patch.

slang.log -> build log for slang
mc-slang.log -> build log for unchanged ebuild (except eautoreconf)
mc-no-slang.log -> build log for your USE=unicode enabled ebuild merged with my changes (patch, eautoreconf). this one works like a charm :) also the resulting mc seems to work fine, except that the old one had mouse support on xterm. this one seems to ignore all clicks...

i put all this in one tgz to save space and time for creating attachments :)

ah.. and i gave USE="X png" on the command line for all builds.

i also packed the ebuild to the logs, just FYI, also including my interix patch.
another thing: this ebuild is from prefix tree, so don't bother about the ${EPREFIX}'es...
Comment 9 Markus Duft (RETIRED) gentoo-dev 2008-05-06 08:36:59 UTC
ah... another thing i forgot: unicode support is somehow b0rked on interix :) it has a wchar.h, but not many of the functions most packages assume to be in there.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2008-05-06 13:08:30 UTC
Reassigning to alt@ as that's where Prefix/Interix problems should go..
Comment 11 Fabian Groffen gentoo-dev 2008-05-06 13:22:42 UTC
holy moly...
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2009-08-02 14:44:22 UTC
(In reply to comment #11)
> holy moly...
> 

indeed

please try 4.7.0_pre1 and reopen if it's still a issue