PKG_CONFIG_PATH -- why won't it work?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PKG_CONFIG_PATH -- why won't it work?

qubit
Greetings all, and thanks to those who have helped me off list.
I am hoisting this to the lists because I can't figure out why the current
configuration doesn't work.  I have googled and read docs and it seems like
there is no reason for it to be failing. I am hoping someone familiar with
this will spot the problem.

First, I am trying to package and build the native C libraries for
brailleblaster.  There are 3 libraries: liblouis, libxml2, and
liblouisutdml.  The last of these depends on the first 2 being built and
installed.

Situation: in my copy of mingw, I have installed the binaries for pkg-config
and its dependencies.
Now my configure script gets a little farther, but dies as follows:
======= begin excerpt =======
checking for pkg-config... /mingw/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BASE_DEPENDENCIES... configure: error: Package requirements
(liblouis, libxml-2.0) were not met:

No package 'liblouis' found
No package 'libxml-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
======= end excerpt =======

Before doing anything I make sure I do the following:

set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
export PKG_CONFIG PKG_CONFIG_PATH

I unzip the source in 3 directories and  build and install them in order so
liblouisutdml is last so the other libraries are installed.
The build is as follows:

# cd to source dir
configure --prefix="/c/louis"
make
make install

According to the docs and helpful geeks, this should work, but for some
reason, my specification of PKG_CONFIG_PATH is not passing the information
to pkg-config when I go to configure liblouisutdml.

What am I doing wrong???

I don't think the spelling is wrong. I have tried multiple ways of
specifying the directories in PKG_CONFIG_PATH, but no matter what I put into
it, it fails.

Oh, but liblouis and libxml2 are installed and their .pc files are in
/c/louis/lib/pkgconfig.  But pkg-config is not finding these files.

So I'm back to asking for comments.
Hope this information is complete enough.
This has taken me a lot longer than I anticipated, and I know the solution
is probably going to be something simple like a typo -- I hope anyway.
But here's the echo again, TIA for any helpful suggestions!
--le


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

John Brown

Hello le,

le wrote:

[snip]

>
> First, I am trying to package and build the native C libraries for
> brailleblaster. There are 3 libraries: liblouis, libxml2, and
> liblouisutdml. The last of these depends on the first 2 being built and
> installed.
>
> Situation: in my copy of mingw, I have installed the binaries for pkg-config
> and its dependencies.
> Now my configure script gets a little farther, but dies as follows:
> ======= begin excerpt =======
> checking for pkg-config... /mingw/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for BASE_DEPENDENCIES... configure: error: Package requirements
> (liblouis, libxml-2.0) were not met:
>
> No package 'liblouis' found
> No package 'libxml-2.0' found
>
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
> ======= end excerpt =======
>
> Before doing anything I make sure I do the following:
>
> set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
> set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
> export PKG_CONFIG PKG_CONFIG_PATH
>
> I unzip the source in 3 directories and build and install them in order so
> liblouisutdml is last so the other libraries are installed.
> The build is as follows:
>
> # cd to source dir
> configure --prefix="/c/louis"
> make
> make install
>
> According to the docs and helpful geeks, this should work, but for some
> reason, my specification of PKG_CONFIG_PATH is not passing the information
> to pkg-config when I go to configure liblouisutdml.
>
> What am I doing wrong???
>
> I don't think the spelling is wrong. I have tried multiple ways of
> specifying the directories in PKG_CONFIG_PATH, but no matter what I put into
> it, it fails.
>
> Oh, but liblouis and libxml2 are installed and their .pc files are in
> /c/louis/lib/pkgconfig. But pkg-config is not finding these files.
>
> So I'm back to asking for comments.
> Hope this information is complete enough.
> This has taken me a lot longer than I anticipated, and I know the solution
> is probably going to be something simple like a typo -- I hope anyway.
> But here's the echo again, TIA for any helpful suggestions!
> --le
>
>

1) You installed liblouis and libxml2 in c:/louis. Therefore the static or
import libraries (*.a) should be in c:/louis/lib, header files should be
in c:/louis/include, and binaries (.exe and .dll) should be in c:/louis/bin.
Is this the case?

2) You say that the .pc files are in c:/louis/lib/pkgconfig and you set
PKG_CONFIG_PATH.

First of all, those set commands have no effect in MSYS.
$ echo $PKG_CONFIG_PATH
and you will see nothing. If you just typed:
PKG_CONFIG="c:/mingw/bin/pkg-config.exe" (which is unnecessary if
c:/mingw/bin is in your PATH) and
PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig" and then
export PKG_CONFIG PKG_CONFIG_PATH, it would probably have worked.
However, I usually run:
export <name1> = <value=1>;
export <name2> = <value2>;
etc.

Did you carry out the procedure for testing if PKG_CONFIG_PATH is
set correctly?

Next, you need to make sure that the .pc files contain the correct
information. If you compiled libxm2 and liblouis yourself, this is
probably the case. If you installed pre-built libraries and the
.pc files were included, those .pc files probably describe file
locations on the developer's system, not yours.

Assuming that you are now setting the environment variable properly,
run 'pkg-config --cflags libxml-2.0'. On my system, I see
-Ic:/mingw/local/include/libxml2. On your system, you should see
-Ic:/louis/include/libxml2. If you don't, you can fix it by:
a) moving the include files to where the .pc file says they are, or
b) editing the .pc file so that it has the real location of the files.

Check liblouis the same way. Pass the liblouis .pc file name without
the .pc extension, for example:

$ pkg-config --cflags louis


3) Libxml2 has a .pc file, so once pkg-config can find it, and the
information is correct, the compiler will be able to find libxml2's
headers and libraries. If liblouis does not have a .pc file, then
you must tell the compiler where to find liblouis, as it is not in
the compiler's default search paths.

$ CFLAGS=-Ic:/louis/include LDFLAGS=-Lc:/louis/lib ./configure ...

Regards,
Alias John Brown.

     
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

lrn-2
On 20.02.2011 5:15, John Brown wrote:

> Hello le,
>
> le wrote:
>
> [snip]
>> First, I am trying to package and build the native C libraries for
>> brailleblaster. There are 3 libraries: liblouis, libxml2, and
>> liblouisutdml. The last of these depends on the first 2 being built and
>> installed.
>>
>> Situation: in my copy of mingw, I have installed the binaries for pkg-config
>> and its dependencies.
>> Now my configure script gets a little farther, but dies as follows:
>> ======= begin excerpt =======
>> checking for pkg-config... /mingw/bin/pkg-config
>> checking pkg-config is at least version 0.9.0... yes
>> checking for BASE_DEPENDENCIES... configure: error: Package requirements
>> (liblouis, libxml-2.0) were not met:
>>
>> No package 'liblouis' found
>> No package 'libxml-2.0' found
>>
>> Consider adjusting the PKG_CONFIG_PATH environment variable if you
>> installed software in a non-standard prefix.
>> ======= end excerpt =======
>>
>> Before doing anything I make sure I do the following:
>>
>> set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
>> set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
>> export PKG_CONFIG PKG_CONFIG_PATH
>>
>> I unzip the source in 3 directories and build and install them in order so
>> liblouisutdml is last so the other libraries are installed.
>> The build is as follows:
>>
>> # cd to source dir
>> configure --prefix="/c/louis"
>> make
>> make install
>>
>> According to the docs and helpful geeks, this should work, but for some
>> reason, my specification of PKG_CONFIG_PATH is not passing the information
>> to pkg-config when I go to configure liblouisutdml.
>>
>> What am I doing wrong???
>>
>> I don't think the spelling is wrong. I have tried multiple ways of
>> specifying the directories in PKG_CONFIG_PATH, but no matter what I put into
>> it, it fails.
>>
>> Oh, but liblouis and libxml2 are installed and their .pc files are in
>> /c/louis/lib/pkgconfig. But pkg-config is not finding these files.
>>
>> So I'm back to asking for comments.
>> Hope this information is complete enough.
>> This has taken me a lot longer than I anticipated, and I know the solution
>> is probably going to be something simple like a typo -- I hope anyway.
>> But here's the echo again, TIA for any helpful suggestions!
>> --le
>>
>>
> 1) You installed liblouis and libxml2 in c:/louis. Therefore the static or
> import libraries (*.a) should be in c:/louis/lib, header files should be
> in c:/louis/include, and binaries (.exe and .dll) should be in c:/louis/bin.
> Is this the case?
>
> 2) You say that the .pc files are in c:/louis/lib/pkgconfig and you set
> PKG_CONFIG_PATH.
>
> First of all, those set commands have no effect in MSYS.
> $ echo $PKG_CONFIG_PATH
> and you will see nothing. If you just typed:
> PKG_CONFIG="c:/mingw/bin/pkg-config.exe" (which is unnecessary if
> c:/mingw/bin is in your PATH) and
> PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig" and then
> export PKG_CONFIG PKG_CONFIG_PATH, it would probably have worked.
> However, I usually run:
> export<name1>  =<value=1>;
> export<name2>  =<value2>;
> etc.
>
> Did you carry out the procedure for testing if PKG_CONFIG_PATH is
> set correctly?
>
> Next, you need to make sure that the .pc files contain the correct
> information. If you compiled libxm2 and liblouis yourself, this is
> probably the case. If you installed pre-built libraries and the
> .pc files were included, those .pc files probably describe file
> locations on the developer's system, not yours.
>
> Assuming that you are now setting the environment variable properly,
> run 'pkg-config --cflags libxml-2.0'. On my system, I see
> -Ic:/mingw/local/include/libxml2. On your system, you should see
> -Ic:/louis/include/libxml2. If you don't, you can fix it by:
> a) moving the include files to where the .pc file says they are, or
> b) editing the .pc file so that it has the real location of the files.
>
> Check liblouis the same way. Pass the liblouis .pc file name without
> the .pc extension, for example:
>
> $ pkg-config --cflags louis
>
>
> 3) Libxml2 has a .pc file, so once pkg-config can find it, and the
> information is correct, the compiler will be able to find libxml2's
> headers and libraries. If liblouis does not have a .pc file, then
> you must tell the compiler where to find liblouis, as it is not in
> the compiler's default search paths.
>
> $ CFLAGS=-Ic:/louis/include LDFLAGS=-Lc:/louis/lib ./configure ...
>
> Regards,
> Alias John Brown.
Also:
4) You can run pkg-config with --debug argument, and it will spill out
the list of directories it actually searches. Just to make sure that
your env. variable is propagated correctly to pkg-config.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

qubit
In reply to this post by qubit
To John Brown:
First, I don't know what you mean about the variables having no meaning in
MSYS -- The first variable
PKG_CONFIG="/c/mingw/bin/pkg-config.exe"
is necessary for what reason I don't know, as that directory should be in
PATH, but when I remove or change that variable, then configure doesn't find
pkg-config at all.

Now on to the second variable:
 PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
 export PKG_CONFIG PKG_CONFIG_PATH
>
Yes, the .pc files are in /c/louis/lib/pkgconfig, but there is one oddity
that I wonder about.
The source tree for the libraries have version numbers in the name. I
checked the actual libraries and they didn't have the version numbers
attached, and neither did the corresponding .pc file.
Could it be that something is expecting a version number on the file name
for the pc file? for example
liblouis-2.2.0.pc instead of liblouis.pc
I kind of doubt it, but I'm grasping at straws.
I have tried a lot of things and still haven't found the magic
conbination...
I am anxious to get this off my to-do list.
Any ideas are very welcome!
Thanks for looking.
--le





----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Sunday, February 20, 2011 4:08 PM
Subject: MinGW-users Digest, Vol 57, Issue 21


Send MinGW-users mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/mingw-users
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-users digest..."


Today's Topics:

   1. Re: PKG_CONFIG_PATH -- why won't it work? (John Brown)
   2. Re: PKG_CONFIG_PATH -- why won't it work? (LRN)
   3. Fails to build GMP-5.0.1 (?ukasz R?c?awowicz)
   4. Re: Fails to build GMP-5.0.1 (LRN)
   5. unix path conversion documentation (Noam Postavsky)
   6. Re: unix path conversion documentation (Keith Marshall)


----------------------------------------------------------------------

Message: 1
Date: Sat, 19 Feb 2011 21:15:35 -0500
From: John Brown <[hidden email]>
Subject: Re: [Mingw-users] PKG_CONFIG_PATH -- why won't it work?
To: <[hidden email]>,
<[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"


Hello le,

le wrote:

[snip]

>
> First, I am trying to package and build the native C libraries for
> brailleblaster. There are 3 libraries: liblouis, libxml2, and
> liblouisutdml. The last of these depends on the first 2 being built and
> installed.
>
> Situation: in my copy of mingw, I have installed the binaries for
> pkg-config
> and its dependencies.
> Now my configure script gets a little farther, but dies as follows:
> ======= begin excerpt =======
> checking for pkg-config... /mingw/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for BASE_DEPENDENCIES... configure: error: Package requirements
> (liblouis, libxml-2.0) were not met:
>
> No package 'liblouis' found
> No package 'libxml-2.0' found
>
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
> ======= end excerpt =======
>
> Before doing anything I make sure I do the following:
>
> set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
> set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
> export PKG_CONFIG PKG_CONFIG_PATH
>
> I unzip the source in 3 directories and build and install them in order so
> liblouisutdml is last so the other libraries are installed.
> The build is as follows:
>
> # cd to source dir
> configure --prefix="/c/louis"
> make
> make install
>
> According to the docs and helpful geeks, this should work, but for some
> reason, my specification of PKG_CONFIG_PATH is not passing the information
> to pkg-config when I go to configure liblouisutdml.
>
> What am I doing wrong???
>
> I don't think the spelling is wrong. I have tried multiple ways of
> specifying the directories in PKG_CONFIG_PATH, but no matter what I put
> into
> it, it fails.
>
> Oh, but liblouis and libxml2 are installed and their .pc files are in
> /c/louis/lib/pkgconfig. But pkg-config is not finding these files.
>
> So I'm back to asking for comments.
> Hope this information is complete enough.
> This has taken me a lot longer than I anticipated, and I know the solution
> is probably going to be something simple like a typo -- I hope anyway.
> But here's the echo again, TIA for any helpful suggestions!
> --le
>
>

1) You installed liblouis and libxml2 in c:/louis. Therefore the static or
import libraries (*.a) should be in c:/louis/lib, header files should be
in c:/louis/include, and binaries (.exe and .dll) should be in c:/louis/bin.
Is this the case?

2) You say that the .pc files are in c:/louis/lib/pkgconfig and you set
PKG_CONFIG_PATH.

First of all, those set commands have no effect in MSYS.
$ echo $PKG_CONFIG_PATH
and you will see nothing. If you just typed:
PKG_CONFIG="c:/mingw/bin/pkg-config.exe" (which is unnecessary if
c:/mingw/bin is in your PATH) and
PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig" and then
export PKG_CONFIG PKG_CONFIG_PATH, it would probably have worked.
However, I usually run:
export <name1> = <value=1>;
export <name2> = <value2>;
etc.

Did you carry out the procedure for testing if PKG_CONFIG_PATH is
set correctly?

Next, you need to make sure that the .pc files contain the correct
information. If you compiled libxm2 and liblouis yourself, this is
probably the case. If you installed pre-built libraries and the
.pc files were included, those .pc files probably describe file
locations on the developer's system, not yours.

Assuming that you are now setting the environment variable properly,
run 'pkg-config --cflags libxml-2.0'. On my system, I see
-Ic:/mingw/local/include/libxml2. On your system, you should see
-Ic:/louis/include/libxml2. If you don't, you can fix it by:
a) moving the include files to where the .pc file says they are, or
b) editing the .pc file so that it has the real location of the files.

Check liblouis the same way. Pass the liblouis .pc file name without
the .pc extension, for example:

$ pkg-config --cflags louis


3) Libxml2 has a .pc file, so once pkg-config can find it, and the
information is correct, the compiler will be able to find libxml2's
headers and libraries. If liblouis does not have a .pc file, then
you must tell the compiler where to find liblouis, as it is not in
the compiler's default search paths.

$ CFLAGS=-Ic:/louis/include LDFLAGS=-Lc:/louis/lib ./configure ...

Regards,
Alias John Brown.




------------------------------

Message: 2
Date: Sun, 20 Feb 2011 09:45:52 +0300
From: LRN <[hidden email]>
Subject: Re: [Mingw-users] PKG_CONFIG_PATH -- why won't it work?
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 20.02.2011 5:15, John Brown wrote:

> Hello le,
>
> le wrote:
>
> [snip]
>> First, I am trying to package and build the native C libraries for
>> brailleblaster. There are 3 libraries: liblouis, libxml2, and
>> liblouisutdml. The last of these depends on the first 2 being built and
>> installed.
>>
>> Situation: in my copy of mingw, I have installed the binaries for
>> pkg-config
>> and its dependencies.
>> Now my configure script gets a little farther, but dies as follows:
>> ======= begin excerpt =======
>> checking for pkg-config... /mingw/bin/pkg-config
>> checking pkg-config is at least version 0.9.0... yes
>> checking for BASE_DEPENDENCIES... configure: error: Package requirements
>> (liblouis, libxml-2.0) were not met:
>>
>> No package 'liblouis' found
>> No package 'libxml-2.0' found
>>
>> Consider adjusting the PKG_CONFIG_PATH environment variable if you
>> installed software in a non-standard prefix.
>> ======= end excerpt =======
>>
>> Before doing anything I make sure I do the following:
>>
>> set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
>> set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
>> export PKG_CONFIG PKG_CONFIG_PATH
>>
>> I unzip the source in 3 directories and build and install them in order
>> so
>> liblouisutdml is last so the other libraries are installed.
>> The build is as follows:
>>
>> # cd to source dir
>> configure --prefix="/c/louis"
>> make
>> make install
>>
>> According to the docs and helpful geeks, this should work, but for some
>> reason, my specification of PKG_CONFIG_PATH is not passing the
>> information
>> to pkg-config when I go to configure liblouisutdml.
>>
>> What am I doing wrong???
>>
>> I don't think the spelling is wrong. I have tried multiple ways of
>> specifying the directories in PKG_CONFIG_PATH, but no matter what I put
>> into
>> it, it fails.
>>
>> Oh, but liblouis and libxml2 are installed and their .pc files are in
>> /c/louis/lib/pkgconfig. But pkg-config is not finding these files.
>>
>> So I'm back to asking for comments.
>> Hope this information is complete enough.
>> This has taken me a lot longer than I anticipated, and I know the
>> solution
>> is probably going to be something simple like a typo -- I hope anyway.
>> But here's the echo again, TIA for any helpful suggestions!
>> --le
>>
>>
> 1) You installed liblouis and libxml2 in c:/louis. Therefore the static or
> import libraries (*.a) should be in c:/louis/lib, header files should be
> in c:/louis/include, and binaries (.exe and .dll) should be in
> c:/louis/bin.
> Is this the case?
>
> 2) You say that the .pc files are in c:/louis/lib/pkgconfig and you set
> PKG_CONFIG_PATH.
>
> First of all, those set commands have no effect in MSYS.
> $ echo $PKG_CONFIG_PATH
> and you will see nothing. If you just typed:
> PKG_CONFIG="c:/mingw/bin/pkg-config.exe" (which is unnecessary if
> c:/mingw/bin is in your PATH) and
> PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig" and then
> export PKG_CONFIG PKG_CONFIG_PATH, it would probably have worked.
> However, I usually run:
> export<name1>  =<value=1>;
> export<name2>  =<value2>;
> etc.
>
> Did you carry out the procedure for testing if PKG_CONFIG_PATH is
> set correctly?
>
> Next, you need to make sure that the .pc files contain the correct
> information. If you compiled libxm2 and liblouis yourself, this is
> probably the case. If you installed pre-built libraries and the
> .pc files were included, those .pc files probably describe file
> locations on the developer's system, not yours.
>
> Assuming that you are now setting the environment variable properly,
> run 'pkg-config --cflags libxml-2.0'. On my system, I see
> -Ic:/mingw/local/include/libxml2. On your system, you should see
> -Ic:/louis/include/libxml2. If you don't, you can fix it by:
> a) moving the include files to where the .pc file says they are, or
> b) editing the .pc file so that it has the real location of the files.
>
> Check liblouis the same way. Pass the liblouis .pc file name without
> the .pc extension, for example:
>
> $ pkg-config --cflags louis
>
>
> 3) Libxml2 has a .pc file, so once pkg-config can find it, and the
> information is correct, the compiler will be able to find libxml2's
> headers and libraries. If liblouis does not have a .pc file, then
> you must tell the compiler where to find liblouis, as it is not in
> the compiler's default search paths.
>
> $ CFLAGS=-Ic:/louis/include LDFLAGS=-Lc:/louis/lib ./configure ...
>
> Regards,
> Alias John Brown.
Also:
4) You can run pkg-config with --debug argument, and it will spill out
the list of directories it actually searches. Just to make sure that
your env. variable is propagated correctly to pkg-config.



------------------------------

Message: 3
Date: Sun, 20 Feb 2011 20:11:40 +0100
From: ?ukasz R?c?awowicz <[hidden email]>
Subject: [Mingw-users] Fails to build GMP-5.0.1
To: [hidden email]
Message-ID:
<AANLkTin7U967o9Q4hTc0xxv=[hidden email]>
Content-Type: text/plain; charset="iso-8859-2"

Hi,

I'm trying to build GMP, but there is some weird problem with paths.

$ ./configure LDFLAGS="-Ld:/mingw/lib"

make && make check && make install seems to work
But building tune fails.

$ make tuneup
gcc -std=gnu99 -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium3
-march=pe
ntium3 -mno-cygwin -Ld:/mingw/lib tuneup.c -o tuneup
tuneup.c:103:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [tuneup] Error 1

$ make tune
make tuneup.exe
make[1]: Entering directory `/d/wtf/gmp-5.0.1/tune'
(...)

make[1]: Leaving directory `/d/wtf/gmp-5.0.1/tune'
./tuneup
Parameters for ./mpn/x86/p6/sse2/gmp-mparam.h
System nie mo?e odnale?? okre?lonej ?cie?ki.
System nie mo?e odnale?? okre?lonej ?cie?ki.
System nie mo?e odnale?? okre?lonej ?cie?ki.

And later...
#define MUL_FFT_MODF_THRESHOLD 565 /* k = 5 */
#define MUL_FFT_TABLE3 \
{ { 565, 5}../mpn/generic/mul_fft.c:459: GNU MP assertion failed: nprime2 <
n

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
make: *** [tune] Error 3

--
Mi?ego dnia
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Sun, 20 Feb 2011 23:01:50 +0300
From: LRN <[hidden email]>
Subject: Re: [Mingw-users] Fails to build GMP-5.0.1
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 20.02.2011 22:11, ?ukasz R?c?awowicz wrote:
> Hi,
>
> I'm trying to build GMP, but there is some weird problem with paths.
>
> $ ./configure LDFLAGS="-Ld:/mingw/lib"
Have you tried "./configure --prefix=/mingw"?



------------------------------

Message: 5
Date: Sun, 20 Feb 2011 16:05:41 -0500
From: Noam Postavsky <[hidden email]>
Subject: [Mingw-users] unix path conversion documentation
To: [hidden email]
Message-ID:
<AANLkTimAkNDosy6jHqNArO0zOSG2gY=[hidden email]>
Content-Type: text/plain; charset=UTF-8

Hi,

I'm trying to get the test suite for xmlstarlet to work under msys,
and since it deals with xpath expressions that can start with "/" I
need to defeat the path conversion that msys performs. The thing is,
this feature seems underdocumented: the README.rtf only says that a
doubled leading slash will protect the option from conversion, but it
looks like there is bit more to it:

$ cat args.c
#include <stdio.h>

int main(int argc, char **argv)
{
    int i;
    for (i = 1; i < argc; i++) {
        printf("arg%d: %s\n", i, argv[i]);
    }
    return 0;
}

$ make args CC=gcc CFLAGS='-Wall -Wextra -ansi -pedantic'
gcc -Wall -Wextra -ansi -pedantic    args.c   -o args
$ ./args /foobar
arg1: C:/MinGW/msys/1.0/foobar
$ ./args //foobar # we can get /foobar
arg1: /foobar
$ ./args /foo/bar
arg1: C:/MinGW/msys/1.0/foo/bar
$ ./args //foo/bar # how can we get /foo/bar?
arg1: //foo/bar
$ ./args '/foo;bar' # a semicolon also stops conversion!?
arg1: /foo;bar

Is there more detailed documentation on this feature anywhere?

thanks, Noam



------------------------------

Message: 6
Date: Sun, 20 Feb 2011 22:08:32 +0000
From: Keith Marshall <[hidden email]>
Subject: Re: [Mingw-users] unix path conversion documentation
To: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 20/02/11 21:05, Noam Postavsky wrote:
> I need to defeat the path conversion that msys performs. The thing
> is, this feature seems underdocumented: the README.rtf only says
> that a doubled leading slash will protect the option from conversion,
> but it looks like there is bit more to it:
>
> ...snip...
>
> $ ./args /foobar
 > arg1: C:/MinGW/msys/1.0/foobar

This is correct, as documented.

> $ ./args //foobar # we can get /foobar
 > arg1: /foobar

Also correct.

> $ ./args /foo/bar
 > arg1: C:/MinGW/msys/1.0/foo/bar

Correct again.

> $ ./args //foo/bar # how can we get /foo/bar?
 > arg1: //foo/bar

This looks like a bug.  I've been aware of some deficiencies in the MSYS
path translation code for some time, but I can't recall having seen this
particular manifestation before.  Unfortunately, I don't have a Windows
box here, to investigate further.

> $ ./args '/foo;bar' # a semicolon also stops conversion!?
 > arg1: /foo;bar

Yes, because the semicolon is Windows native path list separator.  This
is interpreted as a path list argument, which is already in the native
Windows format, so no translation required.

> Is there more detailed documentation on this feature anywhere?

Short of studying the source code, none of which I am aware.

--
Regards,
Keith.



------------------------------

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb

------------------------------

_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


End of MinGW-users Digest, Vol 57, Issue 21
*******************************************


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

Keith Marshall-2
On 21/02/11 02:12, qubit wrote:
> To John Brown: First, I don't know what you mean about the variables
> having no meaning in MSYS -- The first variable
> PKG_CONFIG="/c/mingw/bin/pkg-config.exe" is necessary

He means that the 'set' command syntax you said you used:

> set PKG_CONFIG="c:/mingw/bin/pkg-config.exe"
> set PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
> export PKG_CONFIG PKG_CONFIG_PATH

isn't meaningful to MSYS' Bourne shell; the command syntax is invalid,
so no meaningful assignment is made for either of the two variables you
then attempt to export.  You cannot mix cmd.exe syntax and Bourne shell:

   set VAR=value

is cmd.exe syntax;

   VAR=value
   export VAR

is Bourne shell.  In MSYS you must use the latter; the former is
meaningless.  Since MSYS uses the GNU-bash implementation of Bourne
shell, you may abbreviate the correct (latter) syntax to

   export VAR=value

but you must not use the 'set VAR=value' syntax.

--
Regards,
Keith.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

John Brown
In reply to this post by qubit

Hello le,

> First, I don't know what you mean about the variables having no meaning in
> MSYS

I meant that the "set" command has no effect in MSYS.

johnbrown105@johnbrown105-PC ~
$ set TEST="Hello, world"

johnbrown105@johnbrown105-PC ~
$ export TEST

johnbrown105@johnbrown105-PC ~
$ echo $TEST


johnbrown105@johnbrown105-PC ~
$ export TEST="Hello, world"

johnbrown105@johnbrown105-PC ~
$ echo $TEST
Hello, world

johnbrown105@johnbrown105-PC ~
$

Notice that the first "echo $TEST" outputs nothing, while the second
one outputs "Hello, world". "set VARIABLE=value" works in a
Windows commmand prompt, but not in MSYS. In MSYS, it is
"export VARIABLE=value". Howver, if you "set VARIABLE=value" in a
Windows command prompt, and then start MSYS from that command prompt,
then naturally the variable will be available in MSYS. If you set
your variables that way, you must set them using Windows syntax

> -- The first variable
> PKG_CONFIG="/c/mingw/bin/pkg-config.exe"
> is necessary for what reason I don't know, as that directory should be in
> PATH, but when I remove or change that variable, then configure doesn't find
> pkg-config at all.


I suppose that nothing is impossible, but it would be a very strange
configure script that relies on an environment variable to tell it
where to find pkg-config if it is in fact in your PATH. Have you
checked? Can *you* run pkg-config without specifying the full path?




>
> Now on to the second variable:
> PKG_CONFIG_PATH="/c/louis/lib/pkgconfig:/c/mingw/lib/pkgconfig"
> export PKG_CONFIG PKG_CONFIG_PATH
> >


This is very important. Before you try to build your packages, you
need to make sure that your system is set up correctly. The first
step (mentioned above - not explicitly) is to make sure that
pkg-config.exe is in your PATH, i.e., you can run it just by
typing 'pkg-config' from a directory other than the one in which
pkg-config.exe lives.

Next, you have to make sure that pkg-config is knows where to find
the directory where .pc files are kept. On my system, pkg-config
naturally looks where I want it to look because I built it, but since
you will be installing in a non-standard location, you need the
environment variable PKG_CONFIG_PATH, which consists of a set of
directories separated by semi-colons on Windows, and colons on
Linux. On my system, in the MSYS shell, I should use colons. On
your system, you should test which separator is the correct one.

To test, all you have to do is run "pkg-config --debug" and look
for the lines that start with "Scanning". If there is too much
output (as there is on my system because I have several open-source
libraries installed) then redirect the output to a file and grep
the file. You should see, for example (if you grepped):

$ grep Scanning test.txt
Scanning directory 'c:/temp'
Scanning directory 'd:/downloads/open_source'
Scanning directory 'c:/mingw/local/lib/pkgconfig'

In particular, if you see something like:

Cannot open directory '/c/temp' in package search path: No such file or director
y
Cannot open directory '/d/downloads/open_source' in package search path: No such
 file or directory

near the top of the output, then something is wrong. I got this result
when I make PKG_CONFIG_PATH=/c/temp;/d/downloads/open_source in the
MSYS shell. Note the incorrect semi-colon as the path separator.

This was suggested before, but you have not said whether you carried

out this test or not.

Or you can make life simple and simply make PKG_CONFIG_PATH=
c:/louis/lib/pkgconfig because that is where the pc files are,
and they are not supposed to be in c:/mingw/lib/pkgconfig. If
there is only one directory, then no path separator is needed.


> Yes, the .pc files are in /c/louis/lib/pkgconfig, but there is one oddity
> that I wonder about.
> The source tree for the libraries have version numbers in the name. I
> checked the actual libraries and they didn't have the version numbers
> attached, and neither did the corresponding .pc file.
> Could it be that something is expecting a version number on the file name
> for the pc file? for example
> liblouis-2.2.0.pc instead of liblouis.pc
> I kind of doubt it, but I'm grasping at straws.

Only if the author of the configure script specified the wrong name
for the pc file. The purpose of pkg-config is to give a configure script
information about libraries installed on your system. See
'pkg-config --help' or the docs for details, but if a configure
script needs to know whether a particular version of a library
is installed, then it will run, for example:

$ pkg-config --modversion libxml-2.0
2.7.8

Note that although the authors of this library call it libxml2,
'pkg-config --modversion libxml2' will *not* work. I *must* type
libxml-2.0. This is the name of the pc file without the .pc
extension. Typing "libxml2" is a very basic error that could not survive
testing.

> I have tried a lot of things and still haven't found the magic
> conbination...

I am sure that if you:

1) Make sure that PKG_CONFIG_PATH is set correctly for your system
2) Run configure like this:

CFLAGS=-Ic:/louis/include LDFLAGS=-Lc:/louis/lib configure --prefix=c:/louis

3) Add c:\louis\bin to your PATH, just in case (and make sure that
it really is in your path)

then you will get through.


> I am anxious to get this off my to-do list.
> Any ideas are very welcome!

But if not, read config.log, in which the configure script records
the tests that it performed and the results.


Regards,
Alias John Brown.
     
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

lrn-2
On 21.02.2011 12:13, John Brown wrote:
>
>
> Or you can make life simple and simply make PKG_CONFIG_PATH=
> c:/louis/lib/pkgconfig because that is where the pc files are,
> and they are not supposed to be in c:/mingw/lib/pkgconfig. If
> there is only one directory, then no path separator is needed.
>
>
Actually, as far as i remember, pkg-config will automagically look in
$0/../lib/pkgconfig if $0 ends with `bin'. That is, if pkg-config.exe is
c:/mingw/bin/pkg-config.exe, it WILL look for .pc files in
c:/mingw/lib/pkgconfig by default (and probably will ALSO look there
after scanning PKG_CONFIG_PATH, if you define it). This is supposed to
be a standard practice among glib-based programs, it allows them to be
relocated easily.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

John Brown

Hello LRN,

LRN wrote:

>
> On 21.02.2011 12:13, John Brown wrote:
> >
> >
> > Or you can make life simple and simply make PKG_CONFIG_PATH=
> > c:/louis/lib/pkgconfig because that is where the pc files are,
> > and they are not supposed to be in c:/mingw/lib/pkgconfig. If
> > there is only one directory, then no path separator is needed.
> >
> >
> Actually, as far as i remember, pkg-config will automagically look in
> $0/../lib/pkgconfig if $0 ends with `bin'. That is, if pkg-config.exe is
> c:/mingw/bin/pkg-config.exe, it WILL look for .pc files in
> c:/mingw/lib/pkgconfig by default (and probably will ALSO look there
> after scanning PKG_CONFIG_PATH, if you define it). This is supposed to
> be a standard practice among glib-based programs, it allows them to be
> relocated easily.
>
>

You're right. The official pkg-config works like that. I think my
self-built pkg-config could not find anything without PKG_CONFIG_PATH
so I eventually forced it with
configure --with-pc-path=c:/mingw/local/lib/pkgconfig.

Regards,
Alias John Brown.

     
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: PKG_CONFIG_PATH -- why won't it work?

lrn-2
On 21.02.2011 15:03, John Brown wrote:

> Hello LRN,
>
> LRN wrote:
>> On 21.02.2011 12:13, John Brown wrote:
>>>
>>> Or you can make life simple and simply make PKG_CONFIG_PATH=
>>> c:/louis/lib/pkgconfig because that is where the pc files are,
>>> and they are not supposed to be in c:/mingw/lib/pkgconfig. If
>>> there is only one directory, then no path separator is needed.
>>>
>>>
>> Actually, as far as i remember, pkg-config will automagically look in
>> $0/../lib/pkgconfig if $0 ends with `bin'. That is, if pkg-config.exe is
>> c:/mingw/bin/pkg-config.exe, it WILL look for .pc files in
>> c:/mingw/lib/pkgconfig by default (and probably will ALSO look there
>> after scanning PKG_CONFIG_PATH, if you define it). This is supposed to
>> be a standard practice among glib-based programs, it allows them to be
>> relocated easily.
>>
>>
> You're right. The official pkg-config works like that. I think my
> self-built pkg-config could not find anything without PKG_CONFIG_PATH
> so I eventually forced it with
> configure --with-pc-path=c:/mingw/local/lib/pkgconfig.
>
> Regards,
> Alias John Brown.
>
>
Self-builtness should not affect it. There's a glib function that
locates the package directory and gives it to pkg-config, so that it can
check its lib/pkgconfig subdirectory.
Actually, the patches to the built-in glib-1.2.10 that i've referenced a
few days ago are related to that function -
g_win32_get_package_installation_subdirectory . Without it pkg-config is
indeed unable to locate .pc files without an environment variable.
So yeah, if you didn't patch it right, then your self-built pkg-config
would be like that. /me corrects himself.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe