3

I'm running openSUSE 11.4, which is kinda old, so I'm trying to build some updated dependencies for another thing I want to build.

I've downloaded the source for gcc-6.4.0 (also tried the latest - didn't work).

I'm running ../gcc-6.4.0/configure --prefix=/usr2/aakhavan/local --disable-multilib --enable-languages=c,c++ --disable-bootstrap --disable-libmpx --with-system-zlib

using

gcc-build>gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux)

the make fails with this:

gcc -c -DHAVE_CONFIG_H -g -O2 -I/usr2/aakhavan/local/src/gcc-chain/local/include -I. -I../../../gcc-6.4.0/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  -D_GNU_SOURCE ../../../gcc-6.4.0/libiberty/physmem.c -o physmem.o
In file included from ../../../gcc-6.4.0/libiberty/partition.c:27:
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:424: warning: ISO C90 does not support ‘long long’
In file included from ../../../gcc-6.4.0/libiberty/partition.c:27:
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:521:1: warning: C++ style comments are not allowed in ISO C90
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:521:1: warning: (this will be reported only once per input file)
In file included from ../../../gcc-6.4.0/libiberty/obstack.c:63:
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:424: warning: ISO C90 does not support ‘long long’
In file included from ../../../gcc-6.4.0/libiberty/obstack.c:63:
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:521:1: warning: C++ style comments are not allowed in ISO C90
/usr2/aakhavan/local/src/gcc-chain/local/include/stdlib.h:521:1: warning: (this will be reported only once per input file)
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘call_chunkfun’:
../../../gcc-6.4.0/libiberty/obstack.c:92: error: request for member ‘extra’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:94: error: request for member ‘plain’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘call_freefun’:
../../../gcc-6.4.0/libiberty/obstack.c:101: error: request for member ‘extra’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:103: error: request for member ‘plain’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c: At top level:
../../../gcc-6.4.0/libiberty/obstack.c:115: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:115: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘_obstack_begin_worker’:
../../../gcc-6.4.0/libiberty/obstack.c:119: error: ‘alignment’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:119: error: (Each undeclared identifier is reported only once
../../../gcc-6.4.0/libiberty/obstack.c:119: error: for each function it appears in.)
../../../gcc-6.4.0/libiberty/obstack.c:121: error: ‘size’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c: At top level:
../../../gcc-6.4.0/libiberty/obstack.c:157: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:157: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:156: error: conflicting types for ‘_obstack_begin’
/usr2/aakhavan/local/src/gcc-chain/local/include/obstack.h:183: error: previous declaration of ‘_obstack_begin’ was here
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘_obstack_begin’:
../../../gcc-6.4.0/libiberty/obstack.c:161: error: request for member ‘plain’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:162: error: request for member ‘plain’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:164: error: ‘size’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:164: error: ‘alignment’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:164: error: too many arguments to function ‘_obstack_begin_worker’
../../../gcc-6.4.0/libiberty/obstack.c: At top level:
../../../gcc-6.4.0/libiberty/obstack.c:169: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:169: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:168: error: conflicting types for ‘_obstack_begin_1’
/usr2/aakhavan/local/src/gcc-chain/local/include/obstack.h:185: error: previous declaration of ‘_obstack_begin_1’ was here
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘_obstack_begin_1’:
../../../gcc-6.4.0/libiberty/obstack.c:174: error: request for member ‘extra’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:175: error: request for member ‘extra’ in something not a structure or union
../../../gcc-6.4.0/libiberty/obstack.c:178: error: ‘size’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:178: error: ‘alignment’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:178: error: too many arguments to function ‘_obstack_begin_worker’
../../../gcc-6.4.0/libiberty/obstack.c: At top level:
../../../gcc-6.4.0/libiberty/obstack.c:188: error: expected declaration specifiers or ‘...’ before ‘_OBSTACK_SIZE_T’
../../../gcc-6.4.0/libiberty/obstack.c:188: error: conflicting types for ‘_obstack_newchunk’
/usr2/aakhavan/local/src/gcc-chain/local/include/obstack.h:182: error: previous declaration of ‘_obstack_newchunk’ was here
../../../gcc-6.4.0/libiberty/obstack.c: In function ‘_obstack_newchunk’:
../../../gcc-6.4.0/libiberty/obstack.c:196: error: ‘length’ undeclared (first use in this function)
../../../gcc-6.4.0/libiberty/obstack.c:201: warning: comparison between signed and unsigned
../../../gcc-6.4.0/libiberty/obstack.c: At top level:
../../../gcc-6.4.0/libiberty/obstack.c:298: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_obstack_memory_used’
make[2]: *** [obstack.o] Error 1

I've tried disabling libiberty, but then it complains about building libtools. Searched around online but couldn't find any answers. What the heck is going on?

0
1
+50

From the errors in your compile of obstack.c, it is obvious that you don't have the right environment to build gcc-6.4.0.

I note that gcc can be installed by the command:

sudo zypper install gcc

And that you can find the package gcc6-6.5.0+r265524-2.1.x86_64.rpm in the repository of download.opensuse.org/repositories/devel:/gcc/SLE-11/x86_64/, without the need to compile anything.

In fact, it is extremely difficult to duplicate the exact environment in which an old package was originally compiled. It is much easier and less time-consuming to find a release version of it. Because glibc is truly backward-compatible, this will work even if glibc in your environment is newer, so even if you cannot compile that program any more because your header files are not of the right version.

8
  • Maybe your answer will work too for the topic started, however I have no package manager on my system, so i really need to (cross) compile GCC. Maybe the linker is using the system header files instead of the package header files. I don't know how i can find out. – Flip Oct 10 '19 at 11:09
  • I'm not on openSUSE. I'm just trying to compile GCC and get the same errors about obstack as the person who opened the issue. – Flip Oct 10 '19 at 23:24
  • @Flip then you can open a different question with your specific environment details. – Biswapriyo Oct 11 '19 at 4:46
  • I could have posted a separate question. But i haven't and the bounty can't be transferred AFAIK. If you want the bounty, then read the actual bounty which tells you (briefly but detailed enough) which platform i'm on and how i'm compiling instead of suggesting tools that i don't have. And again ... the original question is about compiling which is the same as my question. – Flip Oct 11 '19 at 10:14
  • @harrymc alright i deleted most of them. Thx for the efforts anyway – Flip Oct 11 '19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.