Compiler does not recognize architecture

0

I am having problems compiling a library (XSB Prolog) in Ubuntu.

I am configuring and compiling it with:

sudo ./configure -prefix=/usr/local/lib/
sudo ./makexsb

Then, I need to execute the following command in order to generate certain dynamic libraries:

sudo ./makexsb dynmodule

But it is failing with the following output:

make -f ../config/x86_64-unknown-linux-gnu/topMakefile dynmodule

Preparing...
make[1]: Entering directory `/home/parallels/prologengines/XSB/emu'
Making XSB Shared Library /home/parallels/prologengines/XSB/config/x86_64-unknown-linux-gnu/bin/libxsb.so
gcc: error: unrecognized command line option ‘-faltivec’
make[1]: *** [xsbdynmod] Error 1

As far as I undestand, the -faltivec option only makes sense when building on PowerPC architectures. So it might be that the correct architecture is not being detected? If that is the case, how can I be sure that the architecture is detected correctly?

Sergio

Posted 2014-03-03T13:17:08.377

Reputation: 103

Answers

1

Looking at build/emuMakefile.in, which produces config/x86_64-unknown-linux-gnu/emuMakefile when running configure script, the -faltivec flag is hardcoded at line 184, so it doesn't depend on target architecture, therefore it's not a problem of architecture detection :

xsbdynmod::
        @echo "Making XSB Shared Library $(bindir)/libxsb.$(SHAREDLIB_EXTENSION)"
        @@LD@ -o libxsb.$(SHAREDLIB_EXTENSION) $(DYNMOD_LDFLAGS)  -faltivec -fPIC $(XSBMOD_LDFLAGS)  $(OBJS) ${ODBCOBJ} ${INTERPROLOGOBJ} -lm
        @cp libxsb.$(SHAREDLIB_EXTENSION) $(bindir) 2>/dev/null || echo ""

You can try to remove it the configure/compile again, but you may also encounter an error suggesting you to recompile with -fPIC in order to create a shared object. Unfortunately I can't figure out where it is missing…

In fact those seem to be bugs from their build system, you should report them upstream maybe.

piernov

Posted 2014-03-03T13:17:08.377

Reputation: 1 796