Skip to content
Advertisement

C compiler cannot create executables on OpenSUSE

I’ve tried to compile xdebug from sources, but I become this output:

fobo66@linux-3z16:~/xdebug-2.3.3> ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... no
configure: error: in `/home/fobo66/xdebug-2.3.3':
configure: error: C compiler cannot create executables
See `config.log' for more details

There is my config.log.

I’ve found possible error:

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file '/usr/lib/crt1.o' is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file '/usr/lib/crti.o' is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file '/usr/lib/crtn.o' is incompatible with i386:x86-64 output /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: dynamic STT_GNU_IFUNC symbol 'strcmp' with pointer equality in '/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie

So, how to fix this when my compiler don’t work?

Advertisement

Answer

Solved!

I’ve just reinstall glibc-devel with correct architecture.

How to do it:

  1. Go to YaST
  2. Choose “Software Management” tool
  3. In a search field type glibc
  4. Mark packages glibc and glibc-devel for update (click on the checkboxes)
  5. Choose glibc package
  6. Click on the “Versions” tab in the bottom
  7. Choose the version with correct architecture, e.g. 2.19-16.15.1-x86_64
  8. Choose glibc-devel package and do 6 and 7 for it
  9. Click “Accept”
  10. Wait for the end of the installation
  11. Close the window

After this compilation should work properly.

This is Windows-like method, and this is a reason why it sucks:)

When somebody know how to do it from terminal, write answer here.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement