On Sun, 13 Apr 2008, James E Keenan wrote: > I recently obtained shell accounts on some Solaris boxes. Today I made my > first attempt to compile and build Parrot on one of them. > > Configuration was very smooth. See log attached. Note for reference: > > Determining if your platform supports GMP.........yes. > ... > Determining if your platform supports crypto......yes, 0.9.8g. > > At the completion of configuration, I was prompted to use gmake to build. The > build generated many "warning: statement not reached" messages. (See log > attached.) Then the build failed completely here: > > /opt/SUNWspro/bin/CC -o miniparrot src/main.o \ > -L/home/kid51/work/parrot/blib/lib -lparrot -lsocket -lnsl -ldl -lm > -lpthread -lrt -lgmp -lcrypto -L/usr/lib -L/usr/ccs/lib > -L/opt/SUNWspro/prod/lib/sparc -L/opt/SUNWspro/prod/lib -L/lib > -L/usr/local/lib -xlibmieee src/null_config.o > ld: fatal: library -lgmp: not found > ld: fatal: library -lcrypto: not found > ld: fatal: File processing errors. No output written to miniparrot > gmake: *** [miniparrot] Error 1 > > It's not clear why 'ld' failed to find gmp or crypto, because Configure.pl > located them without difficulty.
(Incidentally -- gmake is not necessary. I don't know why Configure.pl suggests it. You should try regular 'make' instead (you may have to add /usr/ccs/bin to your PATH). If you want to check out parallel builds, you can try 'dmake' if it's installed.) This failure is probably due to the order of the arguments to CC. Traditional Unix linkers look things up in the order specified on the command line. You don't say where libgmp and libcrypto are installed, but I'll guess they are in /usr/local/lib. The link line specified should have the -L flags before listing -lgmp -lcrypto. This untested patch probably will fix it. I didn't go through the whole Makefile; there are probably other similar instances. However, if this works, you can them apply the same strategy to other parts that break. diff -r -u parrot-current/config/gen/makefiles/root.in parrot-andy/config/gen/makefiles/root.in --- parrot-current/config/gen/makefiles/root.in Mon Apr 14 07:35:09 2008 +++ parrot-andy/config/gen/makefiles/root.in Mon Apr 14 08:59:04 2008 @@ -784,8 +784,8 @@ lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \ $(MINIPARROT) $(LINK) @[EMAIL PROTECTED]@ \ - $(SRC_DIR)/main$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) \ - $(SRC_DIR)/parrot_config$(O) + $(SRC_DIR)/main$(O) @rpath_blib@ $(LINKFLAGS) $(LINK_DYNAMIC) \ + $(SRC_DIR)/parrot_config$(O) $(ALL_PARROT_LIBS) pbc_to_exe.pir : $(PARROT) tools/dev/pbc_to_exe_gen.pl $(PERL) tools/dev/pbc_to_exe_gen.pl \ > Since this is a shell account on an OS on which I am just beginning, debugging > will not be that easy for me. It appears 'svn' is not available. > Suggestions? I use three different methods; each has its benefits and drawbacks, depending on details of your setup, connectivity, and what software is installed. 1. Use rsync. rsync is very useful for this, when it works. Unfortunately, the parrot rsync server tends to be a bit unreliable, but it's working today. Use something like: rsync -avz --delete svn.perl.org::parrot-HEAD parrot-current (rsync is not standard on solaris -- you'd have to build your own.) 2. Use svn on one system where you have it installed. From there, use MANIFEST to build an archive that you copy to the other system. I typically use 'scp' to do the remote copy. 3. Fetch the current "snapshots" with something like wget http://svn.perl.org/snapshots/parrot/parrot-latest.tar.gz (wget is not standard on solaris -- you'd have to build your own.) Note too that many of the Configure.pl problems I have reported are not Solaris-specific. Rather they result from two factors easily reproduced on other systems: 1. The hints files use callbacks. This is easily ported to other systems. Some time ago, I posted patches to implement such callbacks for Linux, for example; though other systems are just as easy to do. 2. The configuration used to build 'perl5' doesn't necessarily match the configuration available to build parrot. This too is easy to mimic elsewhere. Some time ago I also posted step by step instructions for simulating this on any other system. Some things are Solaris-specific[*], however, so Solaris testing is indeed a good idea. [*] Or, more commonly, non-GNU specific. -- Andy Dougherty [EMAIL PROTECTED]