Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[HOWTO] Intel C++ Compiler and per-package CFLAGS

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Locked
Advanced search
100 posts
  • 1
  • 2
  • 3
  • 4
  • Next
Author
Message
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

[HOWTO] Intel C++ Compiler and per-package CFLAGS

Post by mattst88 » Sun Feb 17, 2008 3:18 pm

I've rewritten Gentoo-Wiki's HOWTO on using the Intel C++ Compiler.

http://gentoo-wiki.com/HOWTO_Intel_C_Compiler

The old guide was terribly written and horribly messy.

It also made Portage compile with icc unless you explicitly told it to use gcc. This is bad. Far too many packages don't work with icc to use this behavior. My guide makes Portage compile only specified packages with icc and all others with gcc which will save a few headaches in the long run. It also will give your system the ability to use per-package CFLAGS for gcc and icc!

Need feedback on the guide. Suggestions are welcome.
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

Post by Etal » Sun Feb 17, 2008 10:05 pm

Thanks, that looks interesting.

Is the change in performance noticeable, though? For example, if I bzip an archive or encode a video in x264, how much faster would it be than if I use gcc 4.1 on a Core2 processor?
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Sun Feb 17, 2008 11:53 pm

Code: Select all

decompression linux-2.6.23.tar.bz2
 CC    CFLAGS                     time 1  time 2  time 3  time avg
 icc   "-O2 -xT -parallel -gcc"   20.970  20.917  21.037 20.975
 icc   "-O2 -xT -gcc"             21.384  22.115  21.346 21.615
 icc   "-O3 -xT -parallel -gcc"   22.298  21.682  22.643 22.208
 icc   "-O3 -xT -gcc"             21.543  21.465  21.938 21.649
 icc   "-fast -xT -parallel -gcc" 21.583  21.818  21.584 21.662
 icc   "-fast -xT -gcc"           21.645  21.383  22.042 21.690
 gcc   "-O2 -march=nocona"        21.221  21.620  21.376 21.406
 gcc   "-O3 -march=nocona"        21.076  21.170  20.956 21.067
 gcc   "-Os -march=nocona"        21.712  21.492  21.848 21.684
As far as bzip2 decompression is concerned, "icc -xT -parallel -gcc" beats "gcc -O3 -march=nocona" 20.975 seconds to 21.067. Hardly at all in other words.

Code: Select all

compression linux-2.6.23.tar.bz2
 CC  CFLAGS                     time 1 time 2 time 3 time avg
 icc "-O2 -xT -parallel -gcc"   48.751 48.191 48.592 48.511
 icc "-O2 -xT -gcc"             47.452 48.208 47.969 47.876
 icc "-O3 -xT -parallel -gcc"   48.633 48.822 47.827 48.427
 icc "-O3 -xT -gcc"             46.851 48.087 48.295 47.744
 icc "-fast -xT -parallel -gcc" 49.289 49.789 49.199 49.426
 icc "-fast -xT -gcc"           49.200 49.467 49.441 49.369
 gcc "-O2 -march=nocona"        51.830 53.395 52.037 52.421
 gcc "-O3 -march=nocona"        52.073 53.426 52.331 52.610
 gcc "-Os -march=nocona"        50.256 51.365 51.464 51.028
In the case of compression, "icc -O3 -xT -gcc" beats "gcc -Os -march=nocona" 47.744 to 51.028 seconds. This is a significant difference.

In this thread a user states that xvid is 10-15% faster on an Athlon XP (this is without SSE2,3 optimizations)

Also see:
PHP gcc/icc benchmarks
Top
easy target
Tux's lil' helper
Tux's lil' helper
Posts: 134
Joined: Wed Jan 09, 2008 2:45 pm

Post by easy target » Sun Feb 17, 2008 11:58 pm

AM088 wrote:Thanks, that looks interesting.

Is the change in performance noticeable, though? For example, if I bzip an archive or encode a video in x264, how much faster would it be than if I use gcc 4.1 on a Core2 processor?
This article says something about icc and gcc.
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Mon Feb 18, 2008 4:15 pm

Here faac fails with error:

Code: Select all

icc -O2 -xP -gcc -o .libs/faac main.o input.o  ../libfaac/.libs/libfaac.so -lm /usr/lib/libmp4v2.so -ldl
ld: .libs/faac: hidden symbol `__svml_sin2' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_dsin2.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [faac] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac/frontend'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac'
make: *** [all] Error 2
Any suggestions on how could i solve this?

edit:

same(?) happens witg libtheora. error:

Code: Select all

ld: .libs/decoder_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [decoder_example] Error 1
ld: .libs/chaining_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [chaining_example] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0'
make: *** [all] Error 2
Top
paluszak
Apprentice
Apprentice
Posts: 274
Joined: Mon Jun 28, 2004 4:27 pm
Location: Warsaw, Poland

Post by paluszak » Mon Feb 18, 2008 5:08 pm

I have just compiled x11-themes/qtcurve, x11-themes/gtk-engines-curve and app-mobilephone/obex-data-server, they all seem to work fine. Is there a place where we could make a list of packages that compile fine with ICC?

Another thing is that it pays to read the ICC docs, there are some optimization options that could be considered, for instance, my flags on Pentium4 look like this:

Code: Select all

-march=pentium4 -xW -O2 -ip -gcc
It seems that -ipo could give a huge boost cause it enables multi-file optimizations, but, unfortunately, it's not really compatible with the build system of most Linux packages as it causes the compiler not to generate standard object files during compilation phase.
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Mon Feb 18, 2008 5:16 pm

I have just compiled firefox, but it wont run. I get:

Code: Select all

No running windows found
/usr/libexec/mozilla-launcher: line 119:  2513 Segmentation fault      $(type -P aoss) "$mozbin" $xulparams "$@"
firefox-bin exited with non-zero status (139)
btw I am just compiling e17 packages. for now only thing i can say is that a lot of them compiles fine. enterminus runs, and it is slow as always :).
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Mon Feb 18, 2008 9:32 pm

my specs: core due t 2250, icc version 10.1

e17 (everything below) and all modules build fine
  • dev-libs/eet
    dev-db/edb
    x11-libs/evas
    x11-libs/ecore
    dev-libs/efreet
    dev-libs/embryo
    media-libs/edje
    media-libs/emotion
    media-libs/imlib2
    media-libs/epeg
    media-libs/epsilon
    x11-libs/ewl
    x11-libs/e_dbus
    x11-wm/e
    x11-libs/esmart
    x11-misc/entrance
    x11-terms/enterminus
    app-misc/entropy
from other apps i compiled those also build and run fine:
  • x11-terms/xterm
    x11-plugins/itask-ng
    dev-libs/nss
    dev-libs/nspr
    app-text/hunspell
    xfce-base/thunar
    app-editors/vim-core
    app-editors/gvim
all these are ~x86 at the moment.

edit:

I am writing this with firefox beta 3 :) compiled with -xP -Os -gcc-version=420 -ipo -fomit-frame-pointer -parallel.
Last edited by deno on Thu Feb 21, 2008 10:34 pm, edited 1 time in total.
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Tue Feb 19, 2008 1:10 pm

@paluszak

From icc man page:
-xW -- Can generate SSE2 and SSE instructions, and it can optimize for Intel(R) Pentium(R) 4 processors and
Intel(R) Xeon(R) processors with SSE2. This is the default on Linux systems using Intel(R) 64 architecture. This
option is the same as specifying -march=pentium4
.
Since -xW is the same thing as as -march=pentium4 I don't see the point in setting both flags.
Last edited by deno on Wed Feb 20, 2008 9:39 am, edited 1 time in total.
Top
paluszak
Apprentice
Apprentice
Posts: 274
Joined: Mon Jun 28, 2004 4:27 pm
Location: Warsaw, Poland

Post by paluszak » Wed Feb 20, 2008 8:24 am

deno wrote:@paluszak

From icc man page:
-xW -- Can generate SSE2 and SSE instructions, and it can optimize for Intel(R) Pentium(R) 4 processors and
Intel(R) Xeon(R) processors with SSE2. This is the default on Linux systems using Intel(R) 64 architecture. This
option is the same as specifying -march=pentium4
.
Since -xW is the same thing as -march as -march=pentium4 I don't the point in setting both flags.
Oops, that's all about reading the docs. Anyway, it seems that using -ipo or -ip if -ipo fails gives a huge boost. I generally try to compile packages with -ipo, and if it fails I switch back to -ip.
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Wed Feb 20, 2008 9:05 pm

deno wrote:Here faac fails with error:

Code: Select all

icc -O2 -xP -gcc -o .libs/faac main.o input.o  ../libfaac/.libs/libfaac.so -lm /usr/lib/libmp4v2.so -ldl
ld: .libs/faac: hidden symbol `__svml_sin2' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_dsin2.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [faac] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac/frontend'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac'
make: *** [all] Error 2
Any suggestions on how could i solve this?

edit:

same(?) happens witg libtheora. error:

Code: Select all

ld: .libs/decoder_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [decoder_example] Error 1
ld: .libs/chaining_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [chaining_example] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0'
make: *** [all] Error 2
What are your CFLAGS? Both of these packages compile cleanly with "-O3 -ipo -xT -gcc" on my AMD64 system.
Top
scronkey
n00b
n00b
Posts: 31
Joined: Mon Jan 19, 2004 6:22 am

Post by scronkey » Thu Feb 21, 2008 7:26 am

Good effort on your clean and well written HOWTO.

I installed icc a little while ago, not using portage though. I've just been experimenting with it but I was wondering if the set up described in your article could still be used, without me re-installing the compiler through portage.

From the looks of it I'd say it would work but I'm not sure whether the /etc/portage/bashrc file and the ICCCFLAGS would still be adhered to by portage. I really like the clean separation of what is compiled with what and I want to get Python compiled with icc but considering how central Python is to Gentoo I don't want to go in blindly (Been there before. You're not really a Gentoo until you've borked your Python install!).

Any tips or caveats you're aware of? Is the /etc/portage/bashrc used for other parts of portage or is it something you've implemented?
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Thu Feb 21, 2008 10:52 am

@|mattst88|

Thanks for your replay. Have just compiled libtheora, but faac still fails. I have experimented with flags and it always fails. I have tried:
  • -xP -O2 -gcc-version=420 -fomit-frame-pointer -ipo
    -xP -O2 -gcc-version=420
    -xP -O3 -gcc-version=420 -fomit-frame-pointer -ipo
    -xP -O3 -gcc-version=420
    -xP -Os -gcc-version=420 -fomit-frame-pointer -ipo
    -xP -Os -gcc-version=420
edit:

faac compiles with 'media-libs/faac -mtune=pentium4 -O2 -gcc-version=420'. the same is a must here for libvorbis.
Last edited by deno on Thu Feb 21, 2008 7:50 pm, edited 1 time in total.
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Thu Feb 21, 2008 11:59 am

splashutils now fails (with gcc-4.2.3, probably because of freetype been compiled with icc) error:
gcc -march=prescott -O2 -pipe -fomit-frame-pointer -I/usr/include/freetype2 -L/usr/lib -o fbtruetype -L/usr/lib fbtruetype.o messages.o console.o ttf.o luxisri.o -lfreetype -lm
gcc -march=prescott -O2 -pipe -fomit-frame-pointer -I/usr/include/freetype2 -L/usr/lib -static -o fbtruetype.static -L/usr/lib fbtruetype.o messages.o console.o ttf.o luxisri.o /usr/lib/libfreetype.a /usr/lib/libz.a -lm
ttf.o: In function `Find_Glyph':
ttf.c:(.text+0x13c): undefined reference to `FT_Load_Glyph'
ttf.c:(.text+0x278): undefined reference to `FT_Render_Glyph'
ttf.c:(.text+0x3e9): undefined reference to `FT_Get_Char_Index'
ttf.c:(.text+0x409): undefined reference to `FT_Render_Glyph'
ttf.c:(.text+0x456): undefined reference to `FT_Outline_Transform'
ttf.o: In function `TTF_CloseFont':
ttf.c:(.text+0xc29): undefined reference to `FT_Done_Face'
ttf.o: In function `TTF_OpenFontIndex':
ttf.c:(.text+0xc96): undefined reference to `FT_New_Face'
ttf.c:(.text+0xccc): undefined reference to `FT_New_Memory_Face'
ttf.c:(.text+0xd2b): undefined reference to `FT_Set_Char_Size'
ttf.c:(.text+0xd48): undefined reference to `FT_MulFix'
ttf.c:(.text+0xd69): undefined reference to `FT_MulFix'
ttf.c:(.text+0xd98): undefined reference to `FT_MulFix'
ttf.c:(.text+0xdba): undefined reference to `FT_MulFix'
ttf.c:(.text+0xdd9): undefined reference to `FT_MulFix'
ttf.c:(.text+0xe44): undefined reference to `FT_Done_Face'
ttf.c:(.text+0xe61): undefined reference to `FT_New_Face'
ttf.o: In function `TTF_Quit':
ttf.c:(.text+0x103d): undefined reference to `FT_Done_FreeType'
ttf.o: In function `TTF_Init':
ttf.c:(.text+0x105a): undefined reference to `FT_Init_FreeType'
collect2: ld returned 1 exit status
make[1]: *** [fbtruetype.static] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/splashutils-1.5.3.4/work/miscsplashutils-0.1.8/fbtruetype'
make: *** [all] Error 2
now even if recompile freetype with gcc i get this error compiling splashutils:
Making all in src
CREATE fbsplash.h
Making all in .
In file included from common.h:4,
from mng_callbacks.c:15:
../config.h:51:1: warning: "HAVE_STDLIB_H" redefined
In file included from /usr/include/jpeglib.h:28,
from /usr/include/libmng_types.h:192,
from /usr/include/libmng.h:379,
from mng_callbacks.c:12:
/usr/include/jconfig.h:12:1: warning: this is the location of the previous definition
In file included from common.h:4,
from mng_render.c:17:
../config.h:51:1: warning: "HAVE_STDLIB_H" redefined
In file included from /usr/include/jpeglib.h:28,
from /usr/include/libmng_types.h:192,
from /usr/include/libmng.h:379,
from mng_render.c:15:
/usr/include/jconfig.h:12:1: warning: this is the location of the previous definition
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_info_destroy':
(.text+0x267): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_destroy_info_struct':
(.text+0x7ac): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_create_info_struct':
(.text+0x800): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_sig_cmp':
(.text+0x945): undefined reference to `_intel_fast_memcmp'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_check_sig':
(.text+0x9ce): undefined reference to `_intel_fast_memcmp'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_info_init':
(.text+0xa46): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-png.o): In function `png_info_init_3':
(.text+0xa82): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_destroy.':
(.text+0x1642): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_destroy.':
(.text+0x166e): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_destroy.':
(.text+0x169d): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init':
(.text+0x207d): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init':
(.text+0x2099): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init':
(.text+0x20a9): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_2':
(.text+0x21f7): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_2':
(.text+0x2221): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_2':
(.text+0x2231): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_3':
(.text+0x240c): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_3':
(.text+0x243e): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngread.o): In function `png_read_init_3':
(.text+0x244e): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_set_dither':
(.text+0x4448): undefined reference to `__intel_VEC_memzero'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_set_dither':
(.text+0x4467): undefined reference to `__intel_VEC_memset'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_build_gamma_table.':
(.text+0x5069): undefined reference to `__libm_sse2_pow'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_build_gamma_table.':
(.text+0x5248): undefined reference to `__libm_sse2_pow'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_build_gamma_table.':
(.text+0x538b): undefined reference to `__libm_sse2_pow'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_build_gamma_table.':
(.text+0x54af): undefined reference to `__libm_sse2_pow'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o): In function `png_build_gamma_table.':
(.text+0x55dc): undefined reference to `__libm_sse2_pow'
/usr/lib/libpng12.a(libpng12_la-pngrtran.o):(.text+0x56a2): more undefined references to `__libm_sse2_pow' follow
/usr/lib/libpng12.a(libpng12_la-pngmem.o): In function `png_memset_check':
(.text+0x47): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngmem.o): In function `png_memcpy_check':
(.text+0x5d): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngmem.o): In function `png_create_struct_2':
(.text+0x197): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngmem.o): In function `png_create_struct_2':
(.text+0x1c6): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngmem.o): In function `png_create_struct':
(.text+0x206): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o): In function `png_do_read_interlace':
(.text+0x10c0): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o): In function `png_do_read_interlace':
(.text+0x10e3): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o): In function `png_combine_row':
(.text+0x14aa): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o): In function `png_combine_row':
(.text+0x15ee): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o): In function `png_decompress_chunk.':
(.text+0x1d67): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngrutil.o):(.text+0x1d8f): more undefined references to `_intel_fast_memcpy' follow
/usr/lib/libpng12.a(libpng12_la-pngset.o): In function `png_set_PLTE':
(.text+0x135c): undefined reference to `_intel_fast_memset'
/usr/lib/libpng12.a(libpng12_la-pngset.o): In function `png_set_PLTE':
(.text+0x1370): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngset.o): In function `png_set_pCAL':
(.text+0x147d): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngset.o): In function `png_set_pCAL':
(.text+0x14eb): undefined reference to `_intel_fast_memcpy'
/usr/lib/libpng12.a(libpng12_la-pngset.o): In function `png_set_pCAL':
(.text+0x156c): undefined reference to `_intel_fast_memcpy'
collect2: ld returned 1 exit status
make[4]: *** [splash_util.static] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
...what is here strange to me is that i see intel mentioned again... could ccache have something to do with it?
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Fri Feb 22, 2008 2:56 pm

deno,

I experienced this also. My solution was to compile libpng with gcc. Alternatively, compile freetype, libpng, and splashutils with gcc, and following, recompile libpng and freetype with icc. That's a bit of a headache though.
Top
kaethorn
n00b
n00b
Posts: 2
Joined: Thu Mar 06, 2008 6:35 pm
Location: Stuttgart, Germany
Contact:
Contact kaethorn
Website

Post by kaethorn » Thu Mar 06, 2008 6:50 pm

Hello everyone and thanks for the HOWTO. I've followed the steps mentioned and it seems to work fine for app-arch/bzip2, but that's about it. As soon as I try any package which includes limits.h, compilation fails:

Code: Select all

>>> Emerging (1 of 1) app-arch/cpio-2.9-r1 to /

[snip]

if icc -c99 -DHAVE_CONFIG_H -I. -I. -I..      -MT argp-parse.o -MD -MP -MF ".deps/argp-parse.Tpo" -c -o argp-parse.o argp-parse.c; \
	then mv -f ".deps/argp-parse.Tpo" ".deps/argp-parse.Po"; else rm -f ".deps/argp-parse.Tpo"; exit 1; fi
icc: command line remark #10010: option '-c99' is deprecated and will be removed in a future release. See '-help deprecated'
icc: command line remark #10010: option '-c99' is deprecated and will be removed in a future release. See '-help deprecated'
/usr/include/gentoo-multilib/amd64/limits.h(125): catastrophic error: could not open source file "limits.h"
  # include_next <limits.h>
                           ^

compilation aborted for argp-eexst.c (code 4)
/usr/include/gentoo-multilib/amd64/limits.h(125): catastrophic error: could not open source file "limits.h"
  # include_next <limits.h>
                           ^

compilation aborted for argp-help.c (code 4)
make[3]: *** [argp-eexst.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [argp-help.o] Error 1
/usr/include/gentoo-multilib/amd64/limits.h(125): catastrophic error: could not open source file "limits.h"
  # include_next <limits.h>
                           ^

compilation aborted for argp-parse.c (code 4)
make[3]: *** [argp-parse.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.9-r1/work/cpio-2.9/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.9-r1/work/cpio-2.9/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-arch/cpio-2.9-r1/work/cpio-2.9'
make: *** [all] Error 2
It seems as if the headers from sys-libs/glibc are used instead of the ones found in /opt/intel/cce/10.1.012/include/. I've tried compiling with different combination of flags, such as '-O2 -xT -gcc' which all yield the same result. I'm using amd64.

Any hint/help[/quote] would be greatly appreciated!
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Sun Mar 09, 2008 4:21 am

I experienced this problem for the first time today on my laptop. I can compile the same ebuild on my server with no problems.

I'll investigate and see if I can find a solution.
Top
kaethorn
n00b
n00b
Posts: 2
Joined: Thu Mar 06, 2008 6:35 pm
Location: Stuttgart, Germany
Contact:
Contact kaethorn
Website

Post by kaethorn » Sun Mar 09, 2008 3:21 pm

OK, I found out how to get around the error. I've recently compiled gcc-4.3 (4.3.0-pre20080302 to be precise) from the dirtyepic overlay and set it as the default compiler. Setting it back to 4.2.3 did the trick:

Code: Select all

gcc-config x86_64-pc-linux-gnu-4.2.3
But there's another issue I noticed regarding your /etc/portage/bashrc. It seems to break compilation of app-crypt/gnupg (using gcc), most similar to what this [post=4938398]post[/post] reports. Temporarily replacing the icc bashrc with the original one seems to take care of the problem.
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Tue Mar 18, 2008 1:25 am

This is odd.

My laptop cannot compile php which includes limits.h with icc. I'm using gcc-4.2.3 (no multislot), icc-10.1.012. No other versions of either compiler are installed.

My server can compile php with icc. Here, I'm using gcc-4.1.2 (no multislot), and icc-10.1.012. No other versions of either compiler are installed.

What could be going on?
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Mon Apr 14, 2008 1:58 pm

It appears to me that AMD64 systems are effected by the limits.h mess. My Core 2 Duo laptop, my AMD64 Sempron desktop, and your AMD64 box exhibit this behaviour while my 32-bit x86 server does not.
Top
richardpku
n00b
n00b
Posts: 1
Joined: Sun May 18, 2008 10:02 am

Post by richardpku » Sun May 18, 2008 10:07 am

Add '-fno-builtin' to CFLAGS and they will compile.

Probably it's a bug of ICC. I have also encountered packages that don't compile unless ipo is disabled.
deno wrote:Here faac fails with error:

Code: Select all

icc -O2 -xP -gcc -o .libs/faac main.o input.o  ../libfaac/.libs/libfaac.so -lm /usr/lib/libmp4v2.so -ldl
ld: .libs/faac: hidden symbol `__svml_sin2' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_dsin2.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [faac] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac/frontend'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/faac-1.26-r1/work/faac'
make: *** [all] Error 2
Any suggestions on how could i solve this?

edit:

same(?) happens witg libtheora. error:

Code: Select all

ld: .libs/decoder_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [decoder_example] Error 1
ld: .libs/chaining_example: hidden symbol `__svml_cosf4' in /opt/intel/cc/10.1.012/lib/libsvml.a(svml_scos4.o) is referenced by DSO
ld: final link failed: Nonrepresentable section on output
make[2]: *** [chaining_example] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libvorbis-1.2.0/work/libvorbis-1.2.0'
make: *** [all] Error 2
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Sun May 18, 2008 10:19 am

You meant ICCCFLAGS, thanks for reply, I'll try it.
Top
AzraelNewtype
n00b
n00b
User avatar
Posts: 22
Joined: Mon May 07, 2007 10:30 pm

Post by AzraelNewtype » Fri Jun 13, 2008 7:17 pm

I'm having a particularly bizarre problem with icc since installing using the wiki. Occasionally, programs not listed in /etc/portage/package.icc are getting compiled with icc, sometimes only certain lines of the make process. What's worse though is that it isn't picking up the ICCCFLAGS with the change of compiler, so these compilations break as soon as the switch happens. The last one I noticed it with is subversion, but the error is a little burried so I'll show the output of samba instead:

Code: Select all

icc -pthread -fno-strict-aliasing -O2 -march=native -fomit-frame-pointer -pipe -D_SAMBA_BUILD_=3 -fPIC -I/usr/include/python2.5 -c -I/usr/include/python2.5 -c python/py_spoolss.c -o build/temp.linux-i686-2.5/python/py_spoolss.o -O2 -march=native -fomit-frame-pointer -pipe -D_SAMBA_BUILD_=3 -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -O2 -march=native -fomit-frame-pointer -pipe -D_SAMBA_BUILD_=3 -I/var/tmp/portage/net-fs/samba-3.0.30/work/samba-3.0.30/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -I/var/tmp/portage/net-fs/samba-3.0.30/work/samba-3.0.30/source/lib -D_SAMBA_BUILD_=3
icc: command line error: invalid argument for option '-m'
error: command 'icc' failed with exit status 1
make: *** [python_ext] Error 1
And just to confirm:

Code: Select all

$ grep CFLA /etc/make.conf 
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
ICCCFLAGS="-O2 -xT -ip -gcc"
ICCCXXFLAGS="${ICCCFLAGS}"
Clearly this is mixing and matching for no reason I can readily discern. Has anyone else encountered this?
Top
deno
Guru
Guru
User avatar
Posts: 411
Joined: Wed Sep 13, 2006 4:23 pm

Post by deno » Fri Jun 13, 2008 11:17 pm

Yup. It's because of python. I have recompiled it with gcc and subversion compiled then.
Top
mattst88
Developer
Developer
User avatar
Posts: 426
Joined: Thu Oct 28, 2004 1:25 am
Contact:
Contact mattst88
Website

Post by mattst88 » Sat Jun 14, 2008 6:45 pm

richardpku wrote:Add '-fno-builtin' to CFLAGS and they will compile.
Thank you very much for finding this. I'll add it to the wiki.

Edit: upon testing with php-5.2.6-r1, this does not appear to work.
Top
Locked

100 posts
  • 1
  • 2
  • 3
  • 4
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic