Subject: Re: x11/xorg-imake won't build with icc
To: Emil Skoeldberg <>
From: grant beattie <>
List: tech-pkg
Date: 07/05/2005 19:00:25
On Mon, Jul 04, 2005 at 01:34:19PM +0100, Emil Skoeldberg wrote:

> OK, I have tried to figure this out myself, but only succeeded in 
> getting a few questions:
> 1 As far as I understand, pkgsrc is doing its best to stop me from 
>   supplying library paths to the linker, be it via CFLAGS, LDFLAGS,  
>   LD_LIBRARY_PATH or whatever. Still it seems (from my build attempt  
>   below) like libimf from (in my case) /opt/intel_cc_80/lib is 
>   really needed; so where should this piece of information be supplied?
>   With my (limited) understanding, I would have thought that things like 
>   this should automatically be added by the wrapper scripts, but it 
>   seems not to be the case.

yes, they should be. I'm aware of a few issues with the icc-supplied
libraries but I have not yet had a chance to do anything about them.

I think the key is likely to be statically linking the icc-supplied
libraries where possible (iirc, icc 8.1 introduced some extra flags for
this, it might be trickier with 8.0, I can't remember the details now).

> 2 At the beginning of my attempts to try out pkgsrc on linux with icc,
>   I just set PKGSRC_COMPILER to icc in mk.conf, and went ahead, I then 
>   realised that in order to actually use icc I had to set CC to 
>   path_to/icc (otherwise gcc was used). Again, I would have thought that
>   setting PKGSRC_COMPILER would have been enough, so have I missed 
>   anything in my setup of pkgsrc, or is it just the way it is? 
>   (Why in that case?)

PKGSRC_COMPILER=icc in mk.conf should be all that is needed. 'cc' and
'gcc' wrappers are created so that "dumb" packages still have some
chance of working.

are you saying that all builds used gcc, even when PKGSRC_COMPILER=icc
is set? that seems very wrong...

> Some googling gives that xorg won't build with icc anyway at the moment
> (see, but since the 
> whole attempt to use icc was intended to be some kind of learning 
> experience of how pkgsrc really works, I'm still interested in 
> understanding the above.

indeed, and it's a good place to start :-) I suggest looking at the
icc stuff in mk/compiler/ and mk/wrapper/ - even without reading all of
the wrapper code you should be able to get an idea of how transform-*
and cmd-sink-* work.