Topic: Problems when compiling elixir on a x86_64-pc

hi, I have problems when compiling Elixir on the new cluster of my university which apperently is of structure x86_64. I have been happily using oofem and oofeg on the old cluster for many years and oofem compiles without problem on the new one. I have tried to compile the latest version of Elixir but the resulting error (below) tells me, when running ./configure, that "x86_64-pc" is not recognized. Is there any version of Elixir that would work or am I stuck without oofeg for I while?

best regards r.

Error message:   
[rasmremp@ada Elixir]$ cd src/
[rasmremp@ada src]$ ./configure
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing strerror... none required
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for ranlib... ranlib
checking build system type... Invalid configuration `x86_64-pc-linux-gnuoldld': machine `x86_64-pc' not recognized
configure: error: /bin/sh ./config.sub x86_64-pc-linux-gnuoldld failed

2

Re: Problems when compiling elixir on a x86_64-pc

Hi rasmremp,

Thank you, nice to hear that someone is happy with oofem.
I guess that the problem can be caused by old version of autoconf, that has been used to generate configure script. You may try to download and install newer autoconf (http://www.gnu.org/software/autoconf/) and run "autoconf" command in Elixir src directory. This will regenerate configure script from configure.in. This should help.

Borek

3 (edited by rasmremp 09-05-2007 08:48:36)

Re: Problems when compiling elixir on a x86_64-pc

Hi again! Thank you for the quick help. That solved the problem with Elixir, but then I run in to another error compiling oofeg that I cant solve by my own. I guess this has to do with sharing of libraries. Would ldconfig help?

best regards R.

make[2]: Leaving directory `/c3se/users/rasmremp/oofem-1.7/tm/src'
cd ../../fm/src; make fmlib-oofeg-release
make[2]: Entering directory `/c3se/users/rasmremp/oofem-1.7/fm/src'
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  cbselement.C -o ../oofeg_obj/Release/cbselement.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  fluiddynamicmaterial.C -o ../oofeg_obj/Release/fluiddynamicmaterial.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  cbs.C -o ../oofeg_obj/Release/cbs.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  tr1_2d_cbs.C -o ../oofeg_obj/Release/tr1_2d_cbs.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  newtonianfluid.C -o ../oofeg_obj/Release/newtonianfluid.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  tractionpressurebc.C -o ../oofeg_obj/Release/tractionpressurebc.o
c++ -c -D__OOFEG  -I/c3se/users/rasmremp/oofem-1.7/oofemlib/src    -I/c3se/users/rasmremp/oofem-1.7/../Ckit/include -I/c3se/users/rasmremp/oofem-1.7/../Elixir/include -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE -O -Wall  fmelement.C -o ../oofeg_obj/Release/fmelement.o
rm -f ../oofeg_obj/Release/fmlib.a
ar -r ../oofeg_obj/Release/fmlib.a
ar: creating ../oofeg_obj/Release/fmlib.a
make[2]: Leaving directory `/c3se/users/rasmremp/oofem-1.7/fm/src'
rm -f ../oofeg_obj/Release/../oofeg_obj/Release/oofeg
c++  -D__OOFEMLIB_MODULE -D__SM_MODULE -D__TM_MODULE -D__FM_MODULE  -O -Wall  -D__OOFEG -o ../oofeg_obj/Release/oofeg ../oofeg_obj/Release/oofeg.o ../oofeg_obj/Release/usrdefsub.o  /c3se/users/rasmremp/oofem-1.7/fm/oofeg_obj/Release/fmlib.a /c3se/users/rasmremp/oofem-1.7/tm/oofeg_obj/Release/tmlib.a /c3se/users/rasmremp/oofem-1.7/sm/oofeg_obj/Release/smlib.a /c3se/users/rasmremp/oofem-1.7/oofemlib/oofeg_obj/Release/oofeglib.a     /c3se/users/rasmremp/oofem-1.7/../Elixir/src/libesi.a /c3se/users/rasmremp/oofem-1.7/../Elixir/src/libelixir.a /c3se/users/rasmremp/oofem-1.7/../Ckit/src/libckit.a -lSM -lICE  -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lX11  -lm 
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libSM.so when searching for -lSM
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libSM.a when searching for -lSM
/usr/bin/ld: cannot find -lSM
collect2: ld returned 1 exit status
make[1]: *** [../oofeg_obj/Release/oofeg] Error 1
make[1]: Leaving directory `/c3se/users/rasmremp/oofem-1.7/main/src'
make: *** [oofeg-release] Error 2

4

Re: Problems when compiling elixir on a x86_64-pc

Hi,

strange problem. From the output you have provided, particularly from following lines

> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libSM.a when searching for -lSM
> /usr/bin/ld: cannot find -lSM

I guess, that there is a problem with SM library, which is a part of X Window installation.  Obviously, there is one SM library installed, but it is incompatible. I have never encountered this, probably someone installed it for another architecture (like for 32 bit system) or you are linking 32 bit application with 64 bit library (or vice versa). Check if correct version of X11 libraries is installed.

Borek

Re: Problems when compiling elixir on a x86_64-pc

hello,

after leaving this problem on the shelf for a while I'm now forced to solve this.

According to the administrator of this cluster the correct version should be in the /usr/X11R6/lib64 directory. I have looked in all makefiles that I could find and changed the line of "SYS_LIBSG  =  -lSM -lICE  -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lX11" to "SYS_LIBSG  =  -lSM -lICE  -L/usr/X11R6/lib64 -lXaw -lXmu -lXt -lXext -lX11", but when I compile, the compiler still try to find libsm in the /usr/X11R6/lib directory. Where can I find the line that sets this path?

best regards rasmus

6

Re: Problems when compiling elixir on a x86_64-pc

Hi Rasmus,

from gcc documentation:

-l library
It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, `foo.o -lz bar.o' searches library `z' after file foo.o but before bar.o. If bar.o refers to functions in `z', those functions may not be loaded.

So the solution would be to specify libraries in /usr/X11R6/lib64 using "-l" before any others. The "-L" option will not help, since the default system library paths are searched first.
Try "SYS_LIBSG = -l /usr/X11R6/lib64/libSM.a -l /usr/X11R6/lib64/libICE.a -l /usr/X11R6/lib64/libXaw.a etc"

I still have some feeling, that your gcc compiler is not configured properly, this is quite unusual.
But this should help.

Best regards
Borek