Has anyone managed to build libcaca on 10.0 for x86_64? I've seen the packages from packman for 10.0 and I've been rebuilding a few of them for my athlon64, sometimes with a few patches, but I am officially stumped on libcaca. I get a weird collision between ncuses and slang, it says acs_map has the same definition, but as far as I can see both in ncurses.h (line 218) and in slang.h (line 1323) they are integer arrays, albeit in one case signed and in the other unsigned, and in one case open and in the other numbered . Am I going blind or just stupid? Please, what am I missing?
Hi, On Mon, 12 Sep 2005, Anders Johansson wrote:
Has anyone managed to build libcaca on 10.0 for x86_64?
I've seen the packages from packman for 10.0 and I've been rebuilding a few of them for my athlon64, sometimes with a few patches, but I am officially stumped on libcaca.
I get a weird collision between ncuses and slang, it says acs_map has the same definition, but as far as I can see both in ncurses.h (line 218) and in slang.h (line 1323) they are integer arrays, albeit in one case signed and in the other unsigned, and in one case open and in the other numbered . Am I going blind or just stupid? Please, what am I missing?
The suser-drcux repository has it: emoenke@ftp4:2 19:16:58 /ftp/pub/linux/misc/suser-drcux/100/rpm > dir *caca* -rw-r--r-- 1 emoenke ftp 199785 Aug 26 15:17 caca-utils-0.9-0.pm.0.x86_64.rpm -rw-r--r-- 1 emoenke ftp 111805 Aug 26 15:17 libcaca-devel-0.9-0.pm.0.x86_64.rpm emoenke@ftp4:2 19:17:05 /ftp/pub/linux/misc/suser-drcux/100/rpm > Cheers -e -- Eberhard Moenkeberg (emoenke@gwdg.de, em@kki.org)
On Monday 12 September 2005 19:17, Eberhard Moenkeberg wrote:
The suser-drcux repository has it:
emoenke@ftp4:2 19:16:58 /ftp/pub/linux/misc/suser-drcux/100/rpm > dir *caca* -rw-r--r-- 1 emoenke ftp 199785 Aug 26 15:17 caca-utils-0.9-0.pm.0.x86_64.rpm -rw-r--r-- 1 emoenke ftp 111805 Aug 26 15:17 libcaca-devel-0.9-0.pm.0.x86_64.rpm emoenke@ftp4:2 19:17:05 /ftp/pub/linux/misc/suser-drcux/100/rpm >
Thanks for the tip, but whoever built that cheated. He simply disabled slang to get out of the collision. I would prefer to know why it can't be built with both on x86_64 when it can on x86. It seems like a bug to me
Anders Johansson <andjoh@rydsbo.net> [Mon, 12 Sep 2005 19:33:18 +0200]:
I would prefer to know why it can't be built with both on x86_64 when it can on x86. It seems like a bug to me.
You could say it is! The problem is, that ncurses defines its chtype like so: #ifdef _LP64 /* long int and pointer are 64bit (e.g. axp or x86-64) */ typedef unsigned int chtype; #else typedef unsigned long chtype; #endif And then has extern chtype acs_map[]; Now slang 1.4.9 has in slang.h: typedef unsigned long SLtt_Char_Type; extern SLtt_Char_Type SLcurses_Acs_Map [128]; #define acs_map SLcurses_Acs_Map So SLtt_Char_Type is 32 bit on i386 but 64 bit on x86-64, whereas in ncurses it's always 32 bit. That's why it works on i386 but not on x86-64. The fix is simple, just declare SLtt_Char_type like ncurses does, i.e.: #ifdef _LP64 typedef unsigned int SLtt_Char_Type; #else typedef unsigned long SLtt_Char_Type; #endif Of cause you'll have to rebuild the slang package and all those packages depending on slang, as the ABI changes. That's basically the same change I've proposed for our slang package (I'll be away long holiday). Philipp
On Saturday 17 September 2005 01:52, Philipp Thomas wrote:
So SLtt_Char_Type is 32 bit on i386 but 64 bit on x86-64, whereas in ncurses it's always 32 bit. That's why it works on i386 but not on x86-64. The fix is simple, just declare SLtt_Char_type like ncurses does, i.e.:
#ifdef _LP64 typedef unsigned int SLtt_Char_Type; #else typedef unsigned long SLtt_Char_Type; #endif
Of cause you'll have to rebuild the slang package and all those packages depending on slang, as the ABI changes.
For it to work at runtime yes, but the change should make an immediate impact on my compile of libcaca. The trouble is, it doesn't. That was one of the first things I tried, to change the slang definition to int, but gcc still complains about a mismatch. Which is why my hair is getting progressively thinner
Anders Johansson <andjoh@rydsbo.net> [Sat, 17 Sep 2005 02:01:28 +0200]:
For it to work at runtime yes, but the change should make an immediate impact on my compile of libcaca.
I modified slang.h in a chroot environment to have the mentioned change plus extern SLtt_Char_Type SLcurses_Acs_Map []; And libcaca 0.9 compiled without problems. Of cause it's linked to the wrong library, but it fixed compilation. Philipp
participants (3)
-
Anders Johansson
-
Eberhard Moenkeberg
-
Philipp Thomas