Re: Build failure on 32-bit architectures
Bruno Haible <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jerry, > I just attempted to update the Fedora clisp package to mercurial head > and found that 32-bit platforms fail to compile. When attempting to > link lisp.run, this error occurs: > > lisparit.o: In function `DF_DF_mult_DF': > /builddir/build/BUILD/clisp-2.49/build/../src/dfloat.d:926: undefined > reference to `bitQ' > lisparit.o: In function `DF_DF_mult_DF': > lisparit.c:(.text+0x65f3): undefined reference to `bitQ' > lisparit.c:(.text+0x6627): undefined reference to `bitQ' > lisparit.c:(.text+0x66d1): undefined reference to `bitQ' > lisparit.c:(.text+0x6701): undefined reference to `bitQ' > collect2: error: ld returned 1 exit status > make: *** [Makefile:1405: lisp.run] Error 1 Oops. Thanks for reporting this. I have now pushed the (tiny) fix. > This error appears to have been introduced with this commit: > > changeset: 15707:4e7379e94894 > user: Bruno Haible <[email protected]> > date: Sun Nov 13 22:10:24 2016 +0100 > summary: Prepare for ILP32 ABIs on 64-bit CPUs (x32 on x86_64, n32 > on MIPS64). Yes, this is correct. It was me. > It looks like bitQ is defined as a macro inside lispbibl.d, but only inside: > > #if (long_bitsize==64) || defined(DECALPHA) || defined(MIPS64) || defined(SPARC6 > 4) || defined(IA64) || defined(AMD64) > > Note that there is no corresponding definition inside the #else part. > Note also, though, that many 32-bit platforms do have a 64-bit type, > but it may be long long, instead of long. Yes, the intQ stuff is only meant to be used on 64-bit platforms. It _could_ maybe compile on 32-bit platforms with 'long long' support (which by now nearly every compiler has, except Microsoft of course), but I guess that the hand-written code which uses only intD or intL is more efficient for the 32-bit platforms. Bruno ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel