25 November 2011, 05:22 | #1 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
GCC on Linux and MathIeeeDoubTrans
Dear all!
Could someone help me understand why what I am doing works I am compiling PHP v4.2.3. The maths functions "used" by PHP, such as "atan2", were leading to compilation errors. I solved these errors by adding the options "-m68020 -m68881" to GCC . Yet, two compilation errors still remained, for "asinh" and "acosh": Code:
./.libs/libphp4cli.a(math.o)(.text+0x1150): In function `_zif_asinh': /php-4.2.3/ext/standard/math.c:329: undefined reference to `_asinh' ./.libs/libphp4cli.a(math.o)(.text+0x1230): In function `_zif_acosh': /php-4.2.3/ext/standard/math.c:345: undefined reference to `_acosh' Code:
configure:5776: checking for sin in -lm configure:5795: /usr/local/amiga/bin/m68k-amigaos-gcc.exe -m68020 -m68881 -o conftest -g -O2 conftest.c -lm 1>&5 /usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/bin/ld: cannot find -lm Code:
LDFLAGS="-L/usr/local/amiga/m68k-amigaos/lib/libb/libm020/libm881/libnix/" Code:
configure:5776: checking for sin in -lm configure:5795: /usr/local/amiga/bin/m68k-amigaos-gcc.exe -m68020 -m68881 -o conftest -g -O2 -L/usr/local/amiga/m68k-amigaos/lib/libb/libm020/libm881/libnix/ conftest.c -lm 1>&5 /usr/local/amiga/m68k-amigaos/lib/libb/libm020/libm881/libnix//libm.a(sin.o)(.text+0x4):sin.o: undefined reference to `___MathIeeeDoubTransBase' Code:
configure:5776: checking for sin in -lm configure:5795: /usr/local/amiga/bin/m68k-amigaos-gcc.exe -m68020 -m68881 -noixemul -o conftest -g -O2 conftest.c -lm 1>&5 And, of course, I cannot compile PHP without "ixemul" because some functions are then missing, such as "strtod": so, at this point either I have "sin" and other compilation errors or no compilation errors but for the missing "asinh" and "acosh"... (Interestingly, "math.c" also contains a call to "atanh", which is not causing any compilation error...) How can I link to these functions? Thanks to explain a newbie! Tygre Last edited by tygre; 25 November 2011 at 05:48. Reason: Added some more information... |
26 November 2011, 06:44 | #2 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,412
|
Hiya,
I'm no expert in this stuff but when you're compiling stuff that was coded for UNIX (eg PHP) you normally have to use the crappy old unix emulation lib ixemul (because the Amiga libs lack many of the Unix library functions). I don't use ixemul in my code as it slows everything down, if I'm missing a couple of UNIX methods I just have to code them into my application. It also looks like PHP may need an FPU. I normal use GCC C++ with these options: -fno-rtti -m68040 -O2 -finline-function |
27 November 2011, 04:20 | #3 | |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Quote:
Hi there! Thanks for the info. I begin to understand... With your help and this page, which states that: If -noixemul is specified on the GCC command line, the executable created will not require ixemul.library -- it will use the static linker library LibNIX instead. This library is very Amiga-like and SAS/C-like, so it is convenient for the AmigaOS-specific development. I understand that, when I put "-noixemul", "configure" uses LibNIX, and thus can find "sin" but that it cannot find "sin" without "-noixemul" because... "sin" is not present in "ixemul"? Also, I still don't understand why are "asinh" and "acosh" missing from "ixemul" but not "atanh". I must be overlooking something there... Any idea? Thanks, will try that too! Cheers! Yann |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Porting to Tiny Core Linux and Puppy Linux | lorenzos | support.FS-UAE | 1 | 05 January 2013 16:13 |
StormC V4 gcc - ixnet how to? | NovaCoder | Coders. C/C++ | 1 | 28 February 2012 03:07 |
GCC and GCCFindHit | tygre | Coders. Language | 2 | 20 February 2012 16:45 |
LouiSe's GCC Environment | Morbane | request.Apps | 0 | 27 December 2011 08:02 |
StormC4/GCC | JoJo | Coders. General | 0 | 28 October 2002 09:38 |
|
|