Problem's installing R9C-0

Per Hedeland per@REDACTED
Wed Sep 10 22:34:51 CEST 2003

>Sun Ultra 5, Solaris 8 Sparc
>gcc 2.95.2

Hm, sounds like an install of the "optional software" CD (or whatever
it's called) that comes with the OS - right? I happen to have such a box
here - yup, I can reproduce your problem.

>>>> Raimo Niskanen <raimo@REDACTED> 09/10/03 03:18PM >>>
>What kind of machine are you installing on?
>It seems as the configure script (using the autoconf macro 
>AC_CHECK_SIZEOF) cannot determine the size of neither of "short, int, 
>long, void *, long long, size_t, off_t". This means that it somehow 
>failed to compile and run a little test program that prints 
>"sizeof(TYPE)" to a temporary file and parse the result.
>Very strange. This is a standard configure script macro, they usually 
>perform well.

Even stranger is that erl_interface's configure script (run earlier) had
no problem doing the same thing (maybe the result should be cached:-).
Anyway, this seems to be a case of "broken gcc installation" - I haven't
tried it with a "proper" one on Solaris 8, but I assume that you

Configure *usually* works well, but it's also notorious for drawing
altogether the wrong conclusions when its tests fail in "unexpected"
ways - usually config.log tells the real story in those cases, but here
even that was basically silent, just said that the test program "failed"
w/o giving any error messages. So we have to try to reproduce what it
did (this is the "sizeof short" test):

$ gcc -o conftest -g -O2 -I/var/tmp/otp_src_R9C-0/erts/sparc-sun-solaris2.8 conftest.c -lncurses -lresolv -ldl -lm -lsocket -lnsl
$ ./conftest ./conftest: fatal: open failed: No such file or directory

I.e. what is happening is that libncurses is found at compile time but
not at run time, which on Solaris typically means that you used -L to
point to some non-standard directory, but not the corresponding -R to
point the runtime linker to the same place. And this is what this *gcc
installation* does - adding -v to the options above reveals that it
passes -L/opt/sfw/lib to 'ld' (but no -R), and that is indeed where
libncurses is found.

Per above, I'd recommend a reinstall of gcc (e.g. build from source),
but it's possible to work around by hack^H^H^H^Husing LD_LIBRARY_PATH:

$ env LD_LIBRARY_PATH=/opt/sfw/lib ./conftest
$ cat conftestval 

Doing the build this way means that you will have to use the same method
also when running the system, though. Alternatively you can read crle(1)
and apply.


More information about the erlang-questions mailing list