[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#225449: wxwindows2.4: problems with ia64



On Fri, Jan 02, 2004 at 04:53:30PM +0000, Torsten Werner wrote:
> On 2004-01-02, Matthew Wilcox wrote:
> > I would say that audacity should be compiled with LFS support too.
> > Suppose on x86 it attempts to deal with a file sized more than 2GB?
> 
> The binaries are correct on x86 because the sources are using the opaque
> type off_t.

Now that I look into it, wxwindows is the culprit because the idiots
define off_t *themselves*!  Look at /usr/include/wx/filefn.h :

// define off_t
#if !defined(__WXMAC__) || defined(__UNIX__)
    #include  <sys/types.h>
#else
    typedef long off_t;
#endif

#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined( __INTEL__) )
    typedef _off_t off_t;
#elif defined(__BORLANDC__) && defined(__WIN16__)
    typedef long off_t;
#elif defined(__SC__)
    typedef long off_t;
#elif defined(__MWERKS__) && !defined(__INTEL__)
    typedef long off_t;
#endif

$ touch foo.c
$ gcc -E -dM foo.c |grep UNIX

gcc doesn't define __UNIX__ so they do a typedef.  Oops.

> I think now I know what the problem is:
> 
> On x86 is
> 	int == long < long long
> but on ia64 is
> 	int < long == long long .
> 
> Unfortunately for C++ is long != long long even on ia64 because of
> static type checking. The compiler that compiled the binaries in the
> Debian archive translated off_t into long long but the compiler on my
> ia64 machine compiles off_t into long. Linking is no longer possible.
> 
> 	$ cat x.cc
> 	#include <sys/types.h>
> 	void x(off_t) {}
> 	void y(long) {}
> 	void z(long long) {}
> 	$ nm x.o | c++filt
> 	0000000000000000 T x(long)
> 	0000000000000020 T y(long)
> 	0000000000000040 T z(long long)
> 	$ nm x.o
> 	0000000000000000 T _Z1xl
> 	0000000000000020 T _Z1yl
> 	0000000000000040 T _Z1zx
> 
> All three functions have an int argument with 64 bit size but only the
> first 2 functions have the same C++ linkage.
> 
> Maybe it is not the compiler but the C library that causes that error.
> 
> Torsten
> 

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain



Reply to: