Package Details: gcc47 4.7.4-2

Git Clone URL: (read-only, click to copy)
Package Base: gcc47
Description: The GNU Compiler Collection (4.7.x)
Upstream URL:
Licenses: GPL, custom, LGPL, FDL
Submitter: mosra
Maintainer: severach
Last Packager: severach
Votes: 21
Popularity: 0.000000
First Submitted: 2013-06-06 16:22 (UTC)
Last Updated: 2021-09-28 19:22 (UTC)

Latest Comments

u666sa commented on 2020-06-03 15:39 (UTC)

Does not compile

mkdir -p -- x86_64-pc-linux-gnu/libgcc Checking multilib configuration for libgcc... Configuring stage 1 in x86_64-pc-linux-gnu/libgcc configure: creating cache ./config.cache checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for --enable-version-specific-runtime-libs... yes checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... gawk checking for x86_64-pc-linux-gnu-ar... ar checking for x86_64-pc-linux-gnu-lipo... lipo checking for x86_64-pc-linux-gnu-nm... /var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build/./gcc/nm checking for x86_64-pc-linux-gnu-ranlib... ranlib checking for x86_64-pc-linux-gnu-strip... strip checking whether ln -s works... yes checking for x86_64-pc-linux-gnu-gcc... /var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build/./gcc/xgcc -B/var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
checking for suffix of object files... configure: error: in /var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build/x86_64-pc-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile Seeconfig.log' for more details. make[2]: [Makefile:11751: configure-stage1-target-libgcc] Ошибка 1 make[2]: выход из каталога «/var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build» make[1]: [Makefile:14707: stage1-bubble] Ошибка 2 make[1]: выход из каталога «/var/tmp/pamac-build-alex/gcc47/src/gcc-4.7.4/gcc-build» make: *** [Makefile:870: all] Ошибка 2 /usr/share/makepkg/util/ строка 76: RED: не заданы границы переменной /usr/bin/makepkg: строка 132: logpipe: не заданы границы переменной Не удалось собрать gcc47

severach commented on 2018-11-24 21:47 (UTC)

All fixed.

KarelvdP commented on 2018-10-27 12:31 (UTC) (edited on 2018-10-27 12:31 (UTC) by KarelvdP)

Doesn't compile for me. Fails with:

configure:3602: error: in `/tmp/yaourt-tmp-karel/aur-gcc47/src/x86_64-unknown-linux-gnu/libgcc':

configure:3605: error: cannot compute suffix of object files: cannot compile

Last few errors in config.log:

xgcc: error: unrecognized command line option '-V'

xgcc: error: unrecognized command line option '-qversion'

xgcc: error: unrecognized command line option '-fno-plt'

xgcc: error: unrecognized command line option '-fno-plt'

Tried to compile with make -j2 CC=gcc-6 and just make -j2.

Full config.log:

vtyulb commented on 2017-11-07 19:40 (UTC)

It looks like package is finally broken. Compilation fails with message "configure: error: cannot compute suffix of object files: cannot compile", and there is nothing interesting in internal log. For those, who needs gcc47 for Matlab I can only offer a dirty workaround. I still have half-working package, which was built a year ago. You can download it from here (but you better fix the package, using unsigned packages is a bad thing): After installation of package you'll need to run: sudo ln -s /usr/lib/ /usr/lib/ && sudo ldconfig Compiler works after the hack, but I can't check if it's usable by Matlab, because I don't have one. Good luck!

vtyulb commented on 2016-11-01 15:46 (UTC)

joaocandre, can you send me logs to <> ?

joaocandre commented on 2016-11-01 15:38 (UTC)

I get a lot of undefined references when linking, can't install.

FMorel commented on 2016-10-31 14:03 (UTC)

For me, the package compiles and installs fine with no bug or special edit of PKGBUILD. After installation, the gcc4.7 works well with Matlab/Simulink in accelerator mode just by following instructions on the Archlinux's wiki page about Matlab. I had to change folders in Simulink preferences in order to have the same folder (/tmp for me) for both "Simulation cache folder" and "code generation folder". Tanks to the maintainer !

vtyulb commented on 2016-10-30 14:37 (UTC) (edited on 2016-10-30 14:37 (UTC) by vtyulb)

Fixed errors. You can build it now, or download fresh version from me (not recommended and not safe):

vtyulb commented on 2016-10-29 19:52 (UTC)

I'm trying to fix it now. I compiled latest version 24th of July, can give you that packet if you want.

FMorel commented on 2016-10-29 17:46 (UTC)

I followed the instructions of stonyboy but the compilation failed on my computer. It's a pity because this package would be still useful for Matlab users (gcc47 is an optional dependence even for recent versions).

stonyboy commented on 2016-08-18 13:12 (UTC)

This worked for me: 1) Adding export LD_PRELOAD=/usr/lib/ to PKGBUILD as described by 12qu 2) Installing ppl 1.1-2 (no other dependencies on my machine) as described by antony 3) rm -rf src (not doing this caused a bit of headache) 4) Building and installing the package Thanks to 12qu and antony!

anntzer commented on 2016-07-24 16:35 (UTC)

Thanks. So far I have a workaround by pinning ppl (only used by gcc47 here) to its previous version, I may investigate more another time...

anntzer commented on 2016-07-24 02:51 (UTC)

Currently fails to build, perhaps due to the recent version bump of ppl? <elided> /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `operator delete(void*, unsigned long)@CXXABI_1.3.9' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::invalid_argument::invalid_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/ undefined reference to `std::runtime_error::runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1841: cc1] Error 1 make[2]: Leaving directory '/home/antony/tmp/gcc47/src/gcc-build/gcc' make[1]: *** [Makefile:4332: install-gcc] Error 2 make[1]: Leaving directory '/home/antony/tmp/gcc47/src/gcc-build' make: *** [Makefile:2126: install] Error 2 ==> ERROR: A failure occurred in package(). Aborting...

vtyulb commented on 2016-03-03 19:34 (UTC)

12qu, just build gcc47. Got same error that you wrote, but it's not fatal, package created and works. (I think it's yaourt vs native makepkg) Anyway, I added your magic line, so no errors now (except $srcdir warning) If anybody wants to be a maintainer, please feel free to ask.

12qu commented on 2016-03-03 18:00 (UTC) (edited on 2016-03-03 18:03 (UTC) by 12qu)

Couple of issues with installing this package: 1. Most serious, by default build fails with the following error: ar: /tmp/yaourt-tmp-cornishj/aur-gcc47/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ version `GLIBCXX_3.4.21' not found (required by /usr/bin/../bin/../lib/bfd-plugins/ ../libtool: line 1132: 7565 Segmentation fault (core dumped) [This is followed by a very long `ar` command that I have removed for clarity] This is fixed by adding `export LD_PRELOAD=/usr/lib/` in build() immediately before `configure` is run. 2. `makepkg` gives the following warning: ==> WARNING: Package contains reference to $srcdir

vtyulb commented on 2016-02-21 08:52 (UTC)

I did it! Just added several options to configure script: --disable-libmudflap \ --disable-libquadmath \ --disable-libitm \ and removed fortran from --enable-languages=c,c++,fortran All previous advices/patches are not necessary now.

theodore commented on 2016-02-02 15:17 (UTC) (edited on 2016-02-02 15:18 (UTC) by theodore)

is this package orphan/abandoned, because it is not updated quite some time now and it is broken plus the compilation fails even if I follow @Pilsbert instructions. Any help would be appreciated. I just want to use it for compiling mex for matlab.

Pilsbert commented on 2016-01-10 14:35 (UTC)

It seems that the problem is that ppl, cloog, and LLVM (i.e., gold) are compiled using the system compiler (GCC 5.3) and hence the system libstdc++ is used. However, when now bulding GCC 4.7 this will run into an issue due to the different (ABI?) versions (I get errors where GLIBCXX_3.4.20 and GLIBCXX_3.4.21 cannot be found). For me, the following works with GCC 5.3: * Remove 'libmpc' 'cloog' 'ppl' from depends and makedepends. * To automatically download the dependencies MPFR, GMP, and MPC (as described in the GCC manual) change build() { cd ${srcdir}/${_basedir} to: build() { cd ${srcdir}/${_basedir} ./contrib/download_prerequisites * Remove the configure flags: --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-gold --enable-ld=default --enable-plugin * The patch suggested by rubenvb is NOT necessary here! That's all. As I understand it, removing the above configure flags will remove support to use the gold linker. However, for me this is no problem as I only need GCC 4.7 to compile Matlab MEX files. Hence, the remaining problem will be that now GCC 4.7 won't use some memory optimizations, which require cloog/ppl. I guess to reenable that we have to compile ppl and cloog with the just compiled GCC 4.7 (and not with GCC 5.3!) and than recompile the GCC 4.7 with those libs. However, I'm not familiar with that so maybe someone else want to add this feature :)

severach commented on 2016-01-05 02:27 (UTC)

checking for C compiler default output file name... configure: error: in `/home/chris/build/gcc47/src/gcc-build/x86_64-unknown-linux-gnu/libmudflap': configure: error: C compiler cannot create executables See `config.log' for more details. Makefile:11502: recipe for target 'configure-target-libmudflap' failed

nexero commented on 2015-11-17 07:08 (UTC)

@rubenvb Thanks, without this patch this package wouldn't compile..

rubenvb commented on 2015-09-29 12:39 (UTC)

This patch is needed to compile with GCC 5: diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h index 62cdfab..4f63cc4 100644 --- a/gcc/cp/cfns.h +++ b/gcc/cp/cfns.h @@ -53,6 +53,9 @@ __inline static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ __inline +#ifdef __GNUC_STDC_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif #endif const char * libc_name_p (const char *, unsigned int); /* maximum key range = 391, duplicates = 0 */ @@ -96,7 +99,7 @@ hash (register const char *str, register unsigned int len) 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400 }; - register int hval = len; + register int hval = (int)len; switch (hval) { (remember to put a newline at the end of the patch file)

petric789 commented on 2015-07-10 07:46 (UTC)

mosra: My apologies, error was due to my MAKEFLAGS tweaks. With the default MAKEFLAGS it builds flawlessly. Although the workaround from the gcc48 comments is needed. Thanks! I will remove my other comment, so others don't get confused.

mosra commented on 2015-07-09 20:51 (UTC)

huh. now please tell me what *I* am doing wrong. I tried to build the package four times in last six months, always completely from scratch and it always built successfully. I'm on latest [extra], nothing from [testing], x86_64, gcc 5.1 and clang 3.6.1 installed. Could MAKEFLAGS etc. affect this?

mosra commented on 2015-07-09 08:57 (UTC)

petric789: can you try the workarounds mentioned in the gcc48 package? the problems seem to be similar:

petric789 commented on 2015-07-09 08:46 (UTC)

It still fails to build at this point. I have the exact same problem as simgunz.

simgunz commented on 2015-06-02 14:12 (UTC)

It fails to build at this point. Makefile:549: recipe for target '' failed make[5]: *** [] Error 139 More errors:

leugenea commented on 2014-12-04 20:32 (UTC)

Fails to build: collect2 of ld, Makefile:1841

mosra commented on 2014-07-24 17:15 (UTC)

Updated and fixed. Sorry for the delay.

eleftg commented on 2014-07-02 12:19 (UTC)

GCC 4.7.4 Released

anntzer commented on 2014-06-03 21:11 (UTC)

Builds fine now, I don't know what changed though. Sorry for the false alert.

maleadt commented on 2014-06-02 13:58 (UTC)

Builds fine in here with only the -fstack-protector patch.

anntzer commented on 2014-05-22 09:16 (UTC)

This currently fails to build "as is" (and including the -fstack-protector patch). 1/ package() fails in gcc-build/Makefile, line 3327, complaining about the non-existence of fixincludes. I solved the problem by brute force: $ cp -r src/gcc-build/{build-x86_64-unknown-linux-gnu/,}fixincludes but more likely the "do not apply fixincludes patch" is simply not getting applied. 2/ package() fails again in the same Makefile, line 11159, complaining about the non-existence of x86_64-unknown-linux-gnu/libstdc++-v3. Haven't figured out that one yet.

hzy199411 commented on 2014-05-22 04:10 (UTC)

I think you should add following line(which from gcc46-multilib): # Doesn't like -fstack-protector-strong CFLAGS=${CFLAGS//-fstack-protector-strong/-fstack-protector} export CFLAGS CXXFLAGS=${CXXFLAGS//-fstack-protector-strong/-fstack-protector} export CXXFLAGS Then it can be built correctly

mosra commented on 2014-01-23 22:36 (UTC)

Fixed, thanks for noticing.

sl1pkn07 commented on 2014-01-21 00:50 (UTC)

need ad in options=() 'staticlibs' to maintain .a files. if no, fail build programs by linker not found -lgcc greetings

TiborB commented on 2013-10-25 15:22 (UTC)

Before you modified your PKGBUILD I had removed the problematic line and it compiled... I would say your modification should work as well... Thanks

mosra commented on 2013-10-25 14:02 (UTC)

Sorry about that, I apparently misunderstood what `mv -f` is doing. Hopefully it works now.

TiborB commented on 2013-10-17 21:20 (UTC)

I have got the same error: .......gcc47/pkg/gcc47/usr/lib/gcc/i686-pc-linux-gnu/lib*’: No such file or directory It seems 'mv -f' did not fix the problem.

mosra commented on 2013-10-01 19:27 (UTC)

seschwar: I assume you are building on i686, as I have no such issue on x86-64. Added -f flag to mv, so it shouldn't fail now. As for the multilib issue -- I removed the `provides` array as the package doesn't in fact provide anything (this package was inspired with gcc45, which has the same issue). Moreover it seems that gcc44, gcc45, gcc46 etc. AUR packages have their gcc4*-multilib counterparts and I don't know if having gcc47 along with gcc-multilib (4.8) will cause issues or not. I don't want to maintain package which I don't use, so you might want to create the gcc47-multilib package yourself.

seschwar commented on 2013-09-29 14:49 (UTC)

Also I get the following error when building gcc47: mv: cannot stat ‘/srv/smb/gcc47/pkg/gcc47/usr/lib/gcc/i686-pc-linux-gnu/lib*’: No such file or directory ==> ERROR: A failure occurred in package(). Aborting... It looks like the libraries are already put in the right place by make install. Removing the mv line from package() makes gcc47 build successfully.

seschwar commented on 2013-09-28 20:28 (UTC)

The OSS PKGBUILD¹ requires GCC 4.7 to build. But an issue with gcc47 was pointed out in its comments: gcc47 conflicts with gcc-multilib from [multilib]. The two packages actually have no files in common. Thus they could me installed simultaneously. gcc47's provides=('gcc=4.7') and gcc-multilib's conflicts=('gcc') seems to be the cause of this issue. It would be nice if you adjusted the gcc47 PKGBUILD in such a way so that it can be installed alongside gcc-multilib.. Maybe you can checkout how other PKGBUILDs of older GCC releases do this. At least I hope they do this, as I haven't looked into it. :) 1: