From: Alan W. I. <ai...@us...> - 2003-12-29 21:31:13
|
On 2003-12-29 21:50+0100 Michel Peyrard wrote: > > > For example, it looks like it includes both > > crt2.o and libmathCommon.A.dylib for which you apparently have system > > problems. Cut and paste the above generated g77 without those two libraries > > to see what the results will be. > > The command > g77 x01f.f -I/Users/mpeyrard/plplotcvs/include/plplot -o x01f > -L/Users/mpeyrard/plplotcvs/lib > /Users/mpeyrard/plplotcvs/lib/libplplotf77d.a > /Users/mpeyrard/plplotcvs/lib/libplplotd.a > /Users/mpeyrard/plplotcvs/lib/libcsirocsa.a -L/usr/X11R6/lib -lX11 -lgcc > > gives > /usr/bin/ld: warning prebinding disabled because of undefined symbols > /usr/bin/ld: Undefined symbols: > restFP > saveFP > collect2: ld returned 1 exit status > > In order to avoid this I need to add -lcc_dynamic. See comment below. > > > > One other possibility is libtool just cannot handle the fortran linking > > issues correctly yet on Mac OS X for the shared library case. Could you > > please try the C examples instead? That is instead of cd examples/f... > > above do cd examples/c; make x01c? I am > > particularly interested in whether the shared or static libraries are being > > used in the gcc command generated for the C case, and if shared for the C > > case, why are the shared libraries not being used in the fortran case? > > Here is the result of make x01c > > make x01c > plplot_libtool --mode=link gcc -g -O2 x01c.c > -I/Users/mpeyrard/plplotcvs/include/plplot -L/Users/mpeyrard/plplotcvs/lib > -lplplotd -o x01c > mkdir .libs > gcc -g -O2 x01c.c -I/Users/mpeyrard/plplotcvs/include/plplot -o x01c > -L/Users/mpeyrard/plplotcvs/lib /Users/mpeyrard/plplotcvs/lib/libplplotd.a > /Users/mpeyrard/plplotcvs/lib/libcsirocsa.a -L/usr/X11R6/lib -lX11 -lm > > It compiles and appears to work correctly. Notice that this is on the > build up with --disable-shared I don't understand this inconsistency between fortran and C linking on MacOS X. 10.3. For the above fortran results you needed -lcc_dynamic, but apparently not in this case. Perhaps the -lcc_dynamic functionality is supposed to be delivered by crt2.o and/or libmathCommon.A.dylib (which is what libtool is convinced is necessary for fortran on MacOS X 10.3), but those seem broken on your system. It appears you are stuck with the workarounds you have discovered until at least crt2.o and libmathCommon.A.dylib are straightened out. I am wondering now whether your g77 (which works closely with gcc) is consistent with your gcc package? > > I made a new built (from scratched) with --disable-f77 > --disable-dyndrivers (this is necessary to avoid an error) but > WITHOUT disbale-shared > (command was ./configure --disable-f77 --disable-dyndrivers > --prefix=/Users/mpeyrard/plplotcvs) > > make goes on to the end without error. > > For a reason that I do not understand make install fails: > make install > Making install in drivers > make[2]: Nothing to be done for `install-exec-am'. > /bin/sh ../mkinstalldirs /Users/mpeyrard/plplotcvs/share/doc/plplot > mkdir -p -- /Users/mpeyrard/plplotcvs/share/doc/plplot > /Users/mpeyrard/plplot-5.2.1.cvs.20031228/install -c -m 644 > README.drivers /Users/mpeyrard/plplotcvs/share/doc/plplot/README.drivers > /bin/sh: line 1: /Users/mpeyrard/plplot-5.2.1.cvs.20031228/install: > Permission denied > make[2]: *** [install-docDATA] Error 126 > make[1]: *** [install-am] Error 2 > make: *** [install-recursive] Error 1 Hmm. that seems strange unless you are invoking the command from an incorrect user account which doesn't have permissions to use that directory or you have something left over from a previous install which you are now trying to override from a different account. > > I tried make x01c in the source directory > (/Users/mpeyrard/plplot-5.2.1.cvs.20031228/examples/c) I am surprised this worked at all from the build directory (what you are calling the source directory here). Instead, if you must use the build directory rather than the install directory, use "make check". "make x01c" should only be used for the installed versions of the examples or a copy of them. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the PLplot scientific plotting software package (plplot.org), the Yorick front-end to PLplot (yplot.sf.net), the Loads of Linux Links project (loll.sf.net), and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |