Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 19:29
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Compile GCC 4.9.2 with Intel and AMD support?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
battleshooter


Joined: 14 May 2008
Posts: 1170
Location: Australia

PostPosted: Thu 18 Dec 2014, 09:42    Post subject:  Compile GCC 4.9.2 with Intel and AMD support?  

Gonna cheat a little tonight and recruit direct assistance from the old hands of the forum.

So, I compiled GCC 4.9.2... but the resultant build only builds with AMD (the processor I compiled with) and not Intel. I used the instructions from LFS and this is the third or fourth pass, at least second with the matching tool chain.

Using this configure nicked from LFS:

Code:
SED=sed                       \
../gcc-4.9.2/configure        \
     --prefix=/usr            \
     --enable-languages=c,c++ \
     --disable-bootstrap      \
     --with-system-zlib


make -k -j5 check returns only 7 unexpected failures and it seems to compile fine on AMD processors as I've compiled "XORG and friends" and Billtoo has also confirmed compiling on AMD but not Intel.

The error I get when compiling on an Intel processor:

Code:
_=/usr/bin/make: In function 'net_loss':
_=/usr/bin/make:913:3: internal compiler error: Segmentation fault
mv -f .deps/split.Tpo .deps/split.Po
gcc -DHAVE_CONFIG_H  -I.     -g -O2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R7/include/pixman-1 -I/usr/X11R7/include  -Wall -Wno-pointer-sign -MT report.o -MD -MP -MF .deps/report.Tpo -c -o report.o report.c
mv -f .deps/display.Tpo .deps/display.Po
bin/bash: In function 'report_close':
bin/bash:167:3: internal compiler error: Segmentation fault
gcc -DHAVE_CONFIG_H  -I.     -g -O2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R7/include/pixman-1 -I/usr/X11R7/include  -Wall -Wno-pointer-sign -MT getopt.o -MD -MP -MF .deps/getopt.Tpo -c -o getopt.o getopt.c
mv -f .deps/mtr.Tpo .deps/mtr.Po
mv -f .deps/getopt.Tpo .deps/getopt.Po
gcc -DHAVE_CONFIG_H  -I.     -g -O2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R7/include/pixman-1 -I/usr/X11R7/include  -Wall -Wno-pointer-sign -MT getopt1.o -MD -MP -MF .deps/getopt1.Tpo -c -o getopt1.o getopt1.c
gcc -DHAVE_CONFIG_H  -I.     -g -O2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R7/include/pixman-1 -I/usr/X11R7/include  -Wall -Wno-pointer-sign -MT select.o -MD -MP -MF .deps/select.Tpo -c -o select.o select.c
0xb749fdc7 ???
   /mnt/sda3/Saluki/Chrome/GCC-GLIBC/glibc-2.20/signal/../sysdeps/unix/sysv/linux/i386/sigaction.c:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
0xb74abdc7 ???
   /mnt/sda3/Saluki/Chrome/GCC-GLIBC/glibc-2.20/signal/../sysdeps/unix/sysv/linux/i386/sigaction.c:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:491: recipe for target 'report.o' failed
make[2]: *** [report.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:491: recipe for target 'net.o' failed
make[2]: *** [net.o] Error 1
mv -f .deps/getopt1.Tpo .deps/getopt1.Po
mv -f .deps/select.Tpo .deps/select.Po
mv -f .deps/dns.Tpo .deps/dns.Po
make[2]: Leaving directory '/root/mtr-master'
Makefile:554: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/mtr-master'
Makefile:368: recipe for target 'all' failed
make: *** [all] Error 2


Not sure if that's relevant as I'm fairly sure it's an incompatible processor deal.

So what am I missing?

_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1927
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 18 Dec 2014, 11:04    Post subject:  

This has nothing to do with the processor. Just upgrade the host GCC and GNU make to the latest stable version.
_________________
My homepage
My GitHub profile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
battleshooter


Joined: 14 May 2008
Posts: 1170
Location: Australia

PostPosted: Thu 18 Dec 2014, 19:54    Post subject:  

Iguleder wrote:
This has nothing to do with the processor. Just upgrade the host GCC and GNU make to the latest stable version.


GCC is at 4.9.2 and make is at 4.1.

Also running the same remaster with versions GCC 4.9.2, make 4.1, binutils 2.24, glibc-2.20 on an AMD produces a successful compilation, but same package, same remaster on an Intel produces the error. Thanks for the reply Iguleder.

_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
battleshooter


Joined: 14 May 2008
Posts: 1170
Location: Australia

PostPosted: Fri 19 Dec 2014, 06:20    Post subject:  

Can anyone show me what options they normally use when configuring GCC?
_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2297

PostPosted: Fri 19 Dec 2014, 08:03    Post subject:  

Code:
../gcc-${VERSION}/configure --prefix=/usr \
      --libdir=/usr/lib${LIBDIRSUFFIX} \
      --enable-shared \
      --enable-bootstrap \
      --enable-languages=c,c++ \
      --enable-threads=posix \
      --enable-checking=release \
      --with-system-zlib \
      --with-python-dir=/lib${LIBDIRSUFFIX}/python2.6/site-packages \
      --disable-libunwind-exceptions \
      --enable-__cxa_atexit \
      --enable-libssp \
      --enable-lto \
      --with-gnu-ld \
      ${GCC_ARCHOPTS} \
      --build=${TARGET} \
      --target=${TARGET} \
      --host=${TARGET}

That's for 32bit. Building for 64bit and/or multilib support will use more options and, possibly, tricks.
More important than the version of 'make', is the version of binutils and glibc.
Back to top
View user's profile Send private message 
battleshooter


Joined: 14 May 2008
Posts: 1170
Location: Australia

PostPosted: Fri 19 Dec 2014, 08:24    Post subject:  

Thanks amigo.

What's the value of TARGET?

amigo wrote:
That's for 32bit. Building for 64bit and/or multilib support will use more options and, possibly, tricks.


I'm building for 32bit. For the Carolina Vanguard project. Just trying to upgrade Carolina.

I don't think I need multilibs. I misunderstood it initially, thinking it it was the cause of my error, but now I think enables compiling for 32-bit or 64 bit?.

_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2297

PostPosted: Fri 19 Dec 2014, 14:11    Post subject:  

Yes, multilib creates a compiler which can compile for 32 or 64 bit. TARGET should be the proper triplet of the existing toolchain, unless you are cross-compiling or creating an auxiliary compiler. You can find the current triplet with:
gcc -dumpmachine
assuming that your main compiler is the first one found in your PATH.
Back to top
View user's profile Send private message 
Billtoo


Joined: 07 Apr 2009
Posts: 2186
Location: Ontario Canada

PostPosted: Fri 19 Dec 2014, 15:11    Post subject:  

battleshooter wrote:
Can anyone show me what options they normally use when configuring GCC?


I compiled gcc-4.9.2 in Racy 5.5 by following the instructions at this
web site:

http://www.linuxfromscratch.org/blfs/view/svn/general/gcc.html

It took a long time and I also compiled these:

dejagnu-1.5.1-i686.pet,expect5.45-i686.pet,gmp-6.0.0-i686.pet,mpc-1.0.2-i686.pet,
mpfr-3.1.2-i686.pet, and tcl8.6.3-i686.pet

# uname -ra
Linux puppypc24626 3.0.66 #1 SMP Wed Feb 27 21:59:56 GMT-8 2013 i686 GNU/Linux

# gcc --version
gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

It's working fine I think, I compiled links-2.8,fltk and dillo-3.0.4
and they are working fine.
Back to top
View user's profile Send private message 
battleshooter


Joined: 14 May 2008
Posts: 1170
Location: Australia

PostPosted: Fri 19 Dec 2014, 23:34    Post subject:  

amigo wrote:
Yes, multilib creates a compiler which can compile for 32 or 64 bit. TARGET should be the proper triplet of the existing toolchain, unless you are cross-compiling or creating an auxiliary compiler. You can find the current triplet with:
gcc -dumpmachine
assuming that your main compiler is the first one found in your PATH.


Ahh, okay, thank you very much.

Billtoo wrote:
I compiled gcc-4.9.2 in Racy 5.5 by following the instructions at this
web site


I've been using LFS, can't image there being much of a difference except BLFS has more languages. Anyway, I'll give it a go using BLFS, I'll also reextract gcc-4.9.2, didn't do that last compile, just deleted gcc-build. Thanks for the tip.

_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0830s ][ Queries: 11 (0.0080s) ][ GZIP on ]