Package Details: gcc46 4.6.4-3

Git Clone URL: https://aur.archlinux.org/gcc46.git (read-only)
Package Base: gcc46
Description: The GNU Compiler Collection (4.6.x)
Upstream URL: http://gcc.gnu.org
Licenses: GPL, custom, LGPL
Provides: gcc-4.6
Submitter: anpu
Maintainer: ftschindler
Last Packager: ftschindler
Votes: 15
Popularity: 0.001536
First Submitted: 2012-04-23 22:27
Last Updated: 2015-06-20 11:45

Latest Comments

ftschindler commented on 2015-11-16 09:49

@krnlyng: well, first of all I would investigate to obtain more information.

I think you should try to find out wether the gcc-4.6.4 package is broken (i.e. it should install to different locations or be compiled differently), or wether your application needs a newer std library.

krnlyng commented on 2015-11-09 19:57

Hi! I am trying to build an old version of android with this. But it fails like this: https://bpaste.net/show/fe27c61e12ac what can i do?

ftschindler commented on 2015-09-02 12:44

@maleadt: could you try to build the package with `export LD_PRELOAD=/usr/lib/libstdc++.so.6`, perhaps this is related?

maleadt commented on 2015-08-29 15:02

Package doesn't build because of ar using the LLVMGold.so bfd plugin (part of llvm-libs), yielding "version `GLIBCXX_3.4.21' not found". Tried rebuilding llvm-libs, but that doesn't seem the issue. Temporarily pacman -Rdd'ing llvm-libs (what could go wrong...) gets me past the error.

ftschindler commented on 2014-05-23 17:01

Updated to 4.6.4-3:
* fixed https://github.com/ftalbrecht/aur/issues/3

maleadt commented on 2014-05-23 15:53

Since the recent addition of -fstack-protector-strong to makepkg.conf, which gcc 4.6 doesn't recognize, the bootstrapping fails. Maybe CFLAGS and CXXFLAGS should be unset before the build?

ftschindler commented on 2014-02-27 22:38

Dear all, since I need this package I am adopting it (at least for the time being). It currently builds and works for me. Please report any problems you encounter!

anpu commented on 2014-01-10 10:04

I guess my maintainence was a bit on the lousy side at all times, but lately I find myself unable to do any work on it at all.
So I set this package free to maybe find another, better maintainer.

airanver commented on 2014-01-04 05:35

Hi it does not work in i686,can you fix it ,thanks a lot!

nocko commented on 2013-11-09 21:55

Fix for the error I described. Please update PKGBUILD

https://bbs.archlinux.org/viewtopic.php?pid=1345153

nocko commented on 2013-11-09 14:27

When compiled and installed, I cannot produce any executables. I get the following error in the linker:

/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

Searching the /usr/lib/gcc tree for libgcc.[a|so] turns up only libgcc_s.so . Copying the libgcc.a from the final gcc46 build directory to /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.4/lib doesn't help either.

Advice?

Anonymous comment on 2013-08-07 11:37

@spinach : you don't have enough memory(swap+RAM). In fact /tmp is of type tmpfs.
So you can create a build dir in your home and then you can replace "/tmp/yaourt-tmp-spinach/" by a symbolic link on the build dir.

spinach commented on 2013-08-07 11:07

ar: libbackend.a: No space left on device
make[3]: *** [libbackend.a] Error 1
make[3]: Leaving directory `/tmp/yaourt-tmp-spinach/aur-gcc46/src/gcc-build/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/tmp/yaourt-tmp-spinach/aur-gcc46/src/gcc-build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/tmp/yaourt-tmp-spinach/aur-gcc46/src/gcc-build'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...

root and home partitions each have plenty of space

ttux commented on 2013-07-01 17:46

no gcc46-multilib?

headcra6 commented on 2013-06-01 20:50

update:
Anyway, even with the correct syntax the directory specified in PKGBUILD doesnt exist. .../usr/lib/gcc/i686-pc-linux-gnu/ contains a folder 4.6.4 which in turn contains some include folders. As technic93 stated, ditching the line altogether helps

headcra6 commented on 2013-06-01 18:45

@technic93
there's an obvious error in mv syntax. It should look something like this:
mv "$pkgdir"/usr/lib/gcc/$CHOST/lib/ "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"

jck commented on 2013-05-02 18:26

anpu: The PKGBUILD provided by remy seems to work fine.

technic93 commented on 2013-04-28 11:15

removing this line seems to be ok
mv "$pkgdir"/usr/lib/gcc/$CHOST/lib* "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"

anpu commented on 2013-04-28 11:05

Sorry technic93, I only tested the x86_64 version, since all my computers run on that. If other people with i686 builds could comment on this problem and/or suggest a solution, I will be happy to incorporate it into the package.

technic93 commented on 2013-04-28 08:49

Thx,
It compiles now, but one small error left:
mv: cannot stat ‘/home/tech/PKGBUILD/gcc46/pkg/gcc46/usr/lib/gcc/i686-pc-linux-gnu/lib*’: No such file or directory

anpu commented on 2013-04-27 14:31

Updated the package to the one supplied by philacs.

Many thanks to philacs!

philacs commented on 2013-04-27 04:11

4.6.4 compiles with gcc 4.8
Here is updated pkgbuild and x86_64 binary
https://www.dropbox.com/sh/0c81h4typkc89e0/MPThzMERPE

technic93 commented on 2013-04-22 19:02

Can't compile with 4.8

libiberty/fibheap.c:38:24: error: ‘LONG_MIN’ undeclared (first use in this function)

remyoudompheng commented on 2013-04-05 20:16

The following package worked for me:
https://dev.archlinux.org/~remy/tmp/gcc46-4.6.3-1.src.tar.gz

Anonymous comment on 2013-02-28 13:48

Begin of response about new version of texinfo:
http://cgit.haiku-os.org/buildtools/commit/?id=btrev43050

pelluch commented on 2013-02-26 01:48

After applying jaapcrezee's suggestion, I reproduced stringchopper's error. Attempting to remove the

# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in

from PKGBUILD does not help. I also attempted to remove the install-fixincludes target from the gcc-build Makefile, but came upon several other similar "No such file or directory" errors. I guess this has to do with a simple pathing problem, and will attempt some fixes when I have a bit more time (thankfully rebuilding the whole thing doesn't seem to be necessary as the errors only occur in the package() phase of the PKGBUILD).

jaapcrezee commented on 2013-02-22 09:10

A manual downgrade of texinfo to version 4.13a-8 gives a clean compile again. But thats only temporary ofcourse...

jaapcrezee commented on 2013-02-22 08:55

Currently this (and most other gcc versions also) don't build because of the latest texinfo upgrade (I guess). Is there a patch know to fix this problem?:

Doing info in gcc
make[2]: Entering directory `/data/home_jaap/src/gcc46/gcc46/src/gcc-build/gcc'
if [ xinfo = xinfo ]; then \
makeinfo --split-size=5000000 --split-size=5000000 --no-split -I . -I /data/home_jaap/src/gcc46/gcc46/src/gcc-4.6.3/gcc/doc \
-I /data/home_jaap/src/gcc46/gcc46/src/gcc-4.6.3/gcc/doc/include -o doc/cpp.info /data/home_jaap/src/gcc46/gcc46/src/gcc-4.6.3/gcc/doc/cpp.texi; \
fi
/data/home_jaap/src/gcc46/gcc46/src/gcc-4.6.3/gcc/doc/cppopts.texi:772: @itemx must follow @item
make[2]: *** [doc/cpp.info] Error 1
make[2]: Leaving directory `/data/home_jaap/src/gcc46/gcc46/src/gcc-build/gcc'
make[1]: *** [info-gcc] Error 1
make[1]: Leaving directory `/data/home_jaap/src/gcc46/gcc46/src/gcc-build'
make: *** [do-info] Error 2

Anonymous comment on 2013-02-14 21:25

in the PKGBUILD is this:

# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
---------------------------------

But I got this error:

configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make[1]: Entering directory `/home/briphi/builds/gcc46/src/gcc-build'
/bin/sh /home/briphi/builds/gcc46/src/gcc-4.6.3/mkinstalldirs /home/briphi/builds/gcc46/pkg/usr /home/briphi/builds/gcc46/pkg/usr
mkdir -p -- /home/briphi/builds/gcc46/pkg/usr /home/briphi/builds/gcc46/pkg/usr
/bin/sh: line 3: cd: ./fixincludes: No such file or directory
make[1]: *** [install-fixincludes] Error 1
make[1]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
make: *** [install] Error 2
==> ERROR: A failure occurred in package().
Aborting...
-------------------------------

Which file do I edit (or patch) to have 'make' cd to proper directory. I see at least two 'fixincludes' directories, so not sure what's going on here... should it be, instead of .fixincludes
../fixincludes
../build-i686-pc-linux-gnu/fixincludes
./build-i686-pc-linux-gnu/fixincludes


Or perhaps this (per the line sed line in PKGBUILD) doesn't need to happen at all(?)

artafinde commented on 2012-12-14 20:19

I got into a segmentation fault while building:
/home/inglor/cowerPkg/gcc46/src/gcc-4.6.3/gcc/combine.c: In function ‘rest_of_handle_combine’:
/home/inglor/cowerPkg/gcc46/src/gcc-4.6.3/gcc/combine.c:13846:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

I have an 8core machine and using -j9 flag. Same results with -j1

chenxiaolong commented on 2012-10-15 18:06

@joko: If you install with an AUR helper, such as yaourt or packer, the package is built in /tmp, which is mounted in RAM (and therefore, limited by your free memory). You should download the tarball and build it manually with makepkg :)

joko commented on 2012-10-15 09:23

I get "ranlib: .libs/libgfortran.a: No space left on device" and it seems there is at least 5.2G of free space. How much space is it required?

Sky commented on 2012-09-12 12:35

Thank you :)

anpu commented on 2012-09-12 12:33

@Sky, Added requested changes.

Please note that the package number has not been bumped deliberately.

Sky commented on 2012-09-12 11:54

@cornholio, the PKGBUILD should contain:

mv "$pkgdir"/usr/lib/gcc/$CHOST/lib* "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"

in the package() section.

@anpu, could you update it please ?

cornholio commented on 2012-08-24 17:20

This package puts libgcc_s.so and libgcc_s.so.1 in the version non-specific folder: /usr/lib/gcc/x86_64-unknown-linux-gnu/lib/

gcc43 does this also, so they conflict with each other. Any recommendations about where to move it to?
Would /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/ be OK?

dcelasun commented on 2012-08-23 15:33

This fails for me during package(). Any ideas?

==> Starting package()...
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh /home/dcelasun/builds/gcc46/src/gcc-4.6.3/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --with-ppl --enable-lto --enable-plugin --enable-gold --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-linker-build-id --enable-cloog-backend=isl --enable-ld=default --enable-checking=release --disable-werror --program-suffix=-4.6 --enable-version-specific-runtime-libs CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 --enable-languages=c,c++,fortran,lto --no-create --no-recursion
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name... 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 ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... yes
checking for PWL_handle_timeout in -lpwl... no
checking for version 0.11 (revision 0 or later) of PPL... no
*** This configuration is not supported in the following subdirectories:
zlib
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... no
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... just compiled
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make[1]: Entering directory `/home/dcelasun/builds/gcc46/src/gcc-build'
/bin/sh /home/dcelasun/builds/gcc46/src/gcc-4.6.3/mkinstalldirs /home/dcelasun/builds/gcc46/pkg/usr /home/dcelasun/builds/gcc46/pkg/usr
mkdir -p -- /home/dcelasun/builds/gcc46/pkg/usr /home/dcelasun/builds/gcc46/pkg/usr
/bin/sh: line 3: cd: ./fixincludes: No such file or directory
make[1]: *** [install-fixincludes] Error 1
make[1]: Leaving directory `/home/dcelasun/builds/gcc46/src/gcc-build'
make: *** [install] Error 2
==> ERROR: A failure occurred in package().
Aborting...

dcelasun commented on 2012-08-23 14:49

@Peace4all: Thanks for the patch!

Folks, here is the working PKGBUILD with this patch included: http://ompldr.org/vZjdtMg/gcc46-4.6.3-2.src.tar.gz

Peace4all commented on 2012-07-10 15:50

@ anpu I compile a local GCC 4.6.3 multilib version, and I encountered the same problem as jose1711, its due to the upgrade to glibc 2.16. I created a small patch which I use for my local build, I posted it on pastebin here: http://pastebin.com/VkgE27Pd.

Feel free to use it anyway you like, if its helpful.

anpu commented on 2012-07-10 07:51

Have you run the compilation of gcc46 in a directory where you have compiled it previously?

http://gcc.gnu.org/install/configure.html says
If you have previously built GCC in the same directory for a different target machine, do `make distclean' to delete all files that might be invalid. One of the files this deletes is Makefile; if `make distclean' complains that Makefile does not exist or issues a message like “don't know how to make distclean” it probably means that the directory is already suitably clean. However, with the recommended method of building in a separate objdir, you should simply use a different objdir for each target.

It worked flawlessly on my computer with a clean compile.

jose1711 commented on 2012-07-09 21:03

cannot compile:

In file included from /home/jose/tarballs/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c:333:0:
/home/jose/tarballs/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h: In function ‘x86_fallback_frame_state’:
/home/jose/tarballs/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h:138:17: error: field ‘info’ has incomplete type
make[3]: *** [unwind-dw2.o] Error 1

anpu commented on 2012-05-08 20:41

Added.

mmm commented on 2012-05-08 11:26

please add provides(gcc=4.6) , thank you.

chenxiaolong commented on 2012-04-27 20:08

I've created binary packages for gcc46 because they are needed for the Unity-for-Arch project. Hopefully they will be useful :)

i686: http://ompldr.org/vZGpmYw/gcc46-4.6.3-1-i686.pkg.tar.xz
i686 GPG sig: http://ompldr.org/vZGpmbw/gcc46-4.6.3-1-i686.pkg.tar.xz.asc

x86_64: http://ompldr.org/vZGpmdA/gcc46-4.6.3-1-x86_64.pkg.tar.xz
x86_64 GPG sig: http://ompldr.org/vZGpmdg/gcc46-4.6.3-1-x86_64.pkg.tar.xz.asc

My public key can be retrieved by running:

gpg --keyserver keyserver.ubuntu.com --recv-keys 90EFF32C

anpu commented on 2012-04-23 22:30

Created by grabbing gcc45 (http://aur.archlinux.org/packages.php?ID=48917) and substituting things for 4.6.3, including the patches, which were taken from the svn/git on http://www.archlinux.org/packages/

Please note a file conflict with gcc45:
gcc46: /usr/lib/gcc/x86_64-unknown-linux-gnu/lib/libgcc_s.so exists in filesystem
gcc46: /usr/lib/gcc/x86_64-unknown-linux-gnu/lib/libgcc_s.so.1 exists in filesystem