Error when linking after finish_freezing
This problem only occurs on SunOS.
On SunOS, I receive an error message like the following, when I link after I haveve executed finish_freezing:
cc -o driver -O -DWORKBENCH -I $EIFFEL4/bench/spec/$PLATFORM/include obj1.o obj2.o obj3.o obj4.o Einit.o Evisib.o Eskelet.o Eplug.o Econform.o Ecall.o Edispatch.o Efrozen.o Epattern.o Eoption.o Emain.o $EIFFEL4/bench/spec/$PLATFORM/lib/libwkbench.a -lm ld: $EIFFEL4/bench/spec/$PLATFORM/lib/libwkbench.a: warning: table of contents for archive is out of date; rerun ranlib(1) ld: Undefined symbol _hash_free _hash_search _winit _dserver _umain _debug_mode _hash_malloc make: *** [eiffelbase] Error 2
(This output has been formatted. The problem only occurs on SunOS, so in this case the $PLATFORM variable will always have value sparc. If you are using ISE Eiffel 3, the environment variable will appear as EIFFEL3 rather than EIFFEL4; this also applies to the rest of the present page.)
Execute the following commands:
ranlib $EIFFEL4/bench/spec/$PLATFORM/lib/libwkbench.a ranlib $EIFFEL4/bench/spec/$PLATFORM/lib/libruntime.a
and execute a ranlib on the following files as well (depending on your installation):
This problem is not specific to Eiffel, but has to do with the handling archives on Sun platforms: the path is hard coded so each time you're moving the achives, you must run ranlib again.
After doing that, you will have to run make again in the EIFGEN/W_code directory to finish the C compilation.
It is possible that during C compilation you get a message that looks like:
make: *** No rule to make target `two_way150F.o'. Stop.
This occurs because the precompilation erases the C files and objects files once the intermediate objects are created and the process doesn't expect any problem during the C compilation.
You have two options:
Start the precompilation from scratch, by removing the EIFGEN directory, and redo the entire precompilation process.
Modify the Makefile in the EIFGEN/W_code directory: remove the dependencies for the final linking by replacing `driver: F1/Fobj1.o .... Makefile' by `driver:'. Now run make again, what will do the linking directly.