On 20.02.2011 5:15, John Brown wrote:
> Hello le,
> le wrote:
>> 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
>> 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 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!
> 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
> 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>;
> 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 ...
> Alias John Brown.
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.