Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Why -I/usr/pkg/include in pkgrsc does not work ?: (4 Items)
   
Why -I/usr/pkg/include in pkgrsc does not work ?  
When I compiled new version libiconv in pkgrsc in file config.log I found  following record:

configure:14008: checking for iconv
configure:14042: gcc -o conftest -O2 -I/usr/pkg/include -Wl,-R/usr/pkg/lib conftest.c  /usr/pkg/lib/libiconv.so -Wl,-
rpath -Wl,/usr/pkg/lib >&5
conftest.c:30:19: fatal error: iconv.h: No such file or directory
compilation terminated.

But in directory /usr/pkg/include file iconv.h exists.
And compilation conftest.c with use the same sequence:
   gcc -o conftest -O2 -I/usr/pkg/include -Wl,-R/usr/pkg/lib conftest.c  /usr/pkg/lib/libiconv.so -Wl,-rpath -Wl,/usr/
pkg/lib
 it be holds without problem.
Why -I/usr/pkg/include in pkgrsc does not work ?
Re: Why -I/usr/pkg/include in pkgrsc does not work ?  
I think you should start with the assumption that your problem is local to your machine.   One possible area where there
 might be a problem is permissions.   This can be discovered by running ./configure in super user mode.   I've compiled 
iconv with pkgsrc without problems in the past.
Re: Why -I/usr/pkg/include in pkgrsc does not work ?  
> I think you should start with the assumption that your problem is local to 
> your machine.   One possible area where there might be a problem is 
> permissions.   This can be discovered by running ./configure in super user 
> mode.   I've compiled iconv with pkgsrc without problems in the past.

I checked this is not the problem with permissions.
I work in super user mode.
I've compiled iconv with pkgsrc without problems too. 
But I always check config.log and it interested me why so happens:
 configure:14008: checking for iconv
Re: Why -I/usr/pkg/include in pkgrsc does not work ?  
> When I compiled new version libiconv in pkgrsc

> Why -I/usr/pkg/include in pkgrsc does not work ?

configure is looking at your system and tries to figure out what is part of the system. iconv.h is part of libiconv you 
are compileing!? So it is the right thing to ignore any older iconv.h derived from any libiconv. So I suppose that the 
shown error is intentional. You may have a look into the script configure if you are interested in the details ...

The pkgsrc tools may use another gcc than the one you are using when invoking gcc on your own. Search for gcc after a 
successfull build in the work directory, e.g. by using 

find . -name gcc

and will find wrappers calling gcc with additional parameters etc. ...