Justin Walker on Thu, 17 Apr 2003 23:28:58 -0700


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

Re: GP2C



On Wednesday, Apr 16, 2003, at 03:27 US/Pacific, Karim BELABAS wrote:

On Tue, 15 Apr 2003, Justin Walker wrote:
./scripts/dotest: -o: command not found
FAIL: scripts/dotest
===================
1 of 1 tests failed
===================

and I think this is why the problem arises - from the ./configure step:

checking for PARI module build... /usr/bin/gcc -c -o %s.o -O3
-DGCC_INLINE -Wall -fomit-frame-pointer -no-cpp-precomp -fno-common
-I/usr/local/include %s.c && -o %s.so %s.o

Not sure why the spurious '&&' is in there, at the end.

I am building gp2c in the same directory that holds the pari
development tree:
$ ls ..
....        gp2c-0.0.2pl5       pari                readline-4.1
$

Thoughts on this?

DLLD is undefined.

The real problem is that, although install() now works on OS X [ I think and hope... ] as far as loading symbols from gp's global context goes, we still have not tried it with external "bundles", nor built into Configure the
necessary magic to build a dynamically loadable object.

I noticed that 2.2.5->2.2.6 seemed to take away building the shared library on Mac OS X. Is that easy to repair?

Probably something like 'ld -bundle' (?). Hopefully something generic like 'gcc -shared' would work equally well. Can you just try to Configure pari
with

  env DLLD=/usr/bin/gcc Configure

before reconfiguring gp2c ? [ actually, does 'make bench' succeed in building
gp-dyn after this change ? ]

I did the above in both the pari and gp2c directories, and the build worked in both cases, but for 'gp2c', the "make check" failed (as before: '-o' was attempted as a command). It appears that the PARI_MODULE_BUILD macro is the culprit, FWIW.

Also, there is no gp-dyn after 'make bench' in 'pari'.

If it does work, then a trivial fix to config/get_dlld might do [ just have
to add darwin to the list of supported systems, lines 12-24 ]

For 'pari', I added two darwin entries:
in the '$osname-$arch' case statement:
  darwin-*)soname=dyld ; sodest= ;DLSUFFIX=dylib ;;
in the '$osname' case statement:
      darwin)  DLLD=/usr/bin/gcc ;;
Something else is needed, though. Not sure what, yet. At least, when I cobbled together a libtool line, I got a .dylib. Not sure yet whether it works, though.

P.S: all this rather belongs to pari-dev [ none of the above apply to the
stable version ]. Let's move the discussion there.

Moved and seconded :-}.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        |   If you're not confused,
                                       |   You're not paying attention
*--------------------------------------*-------------------------------*