LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Analyze "configure" script after adding PKG_CONFIG_DEBUG_SPEW option (https://www.linuxquestions.org/questions/programming-9/analyze-configure-script-after-adding-pkg_config_debug_spew-option-4175652769/)

AnneRanch 04-25-2019 12:57 PM

Analyze "configure" script after adding PKG_CONFIG_DEBUG_SPEW option
 
Could somebody help me to figure out where is the problem?
I am including partial output from "configure" script where it "adds" directories -after executing "export" - first part of the snippet , but it physically does not create them.

It cannot "find " them later - second part of the snippet.

Perhaps I am missing some option in"configure" ?

Here is the CLI


Code:

sudo ./configure_421 --prefix=/usr/local/BLUEZ --enable-library --host=arm-linux-gnueabihf --mandir=/usr/share/man --enable-debug PKG_CONFIG_PATH=/media/jim/DEV/GLIB/GLIB_2.54.3/glib-2.54.3 PKG_CONFIG_DEBUG_SPEW=set

Quote:


@line export PKG_CONFIG_LIBDIR = /usr/local/lib/arm-linux-gnueabihf/pkgconfig:/usr/local/arm-linux-gnueabihf/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/arm-linux-gnueabihf/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig (?)
@line export PKG_CONFIG_LIBDIR trace TOK (?)
Package argument - no index = --exists
Package argument - no index = glib-2.0 >= 2.28
Argument #1 = --exists
Argument #2 = glib-2.0 >= 2.28
PKG_CONFIG_DEBUG_SPEW variable enabling debug spew
Adding directory '/media/jim/DEV/GLIB/GLIB_2.54.3/glib-2.54.3' from PKG_CONFIG_PATH
Adding directory '/usr/local/lib/arm-linux-gnueabihf/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/local/arm-linux-gnueabihf/lib/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/local/share/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/lib/arm-linux-gnueabihf/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/arm-linux-gnueabihf/lib/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/lib/pkgconfig' from PKG_CONFIG_PATH
Adding directory '/usr/share/pkgconfig' from PKG_CONFIG_PATH
Global variable definition 'pc_sysrootdir' = '/'
Global variable definition 'pc_top_builddir' = '$(top_builddir)'
Error printing disabled by default due to use of output options --exists, --atleast/exact/max-version, --list-all or no output option at all. Value of --print-errors: 1
Error printing enabled
Adding virtual 'pkg-config' package to list of known packages
...............................
Ignoring file 'test-suite.log' in search directory; not a .pc file
Cannot open directory #2 '/usr/local/lib/arm-linux-gnueabihf/pkgconfig' in package search path: No such file or directory
Cannot open directory #3 '/usr/local/arm-linux-gnueabihf/lib/pkgconfig' in package search path: No such file or directory
Cannot open directory #4 '/usr/local/share/pkgconfig' in package search path: No such file or directory
Cannot open directory #5 '/usr/lib/arm-linux-gnueabihf/pkgconfig' in package search path: No such file or directory
Cannot open directory #6 '/usr/arm-linux-gnueabihf/lib/pkgconfig' in package search path: No such file or directory
Scanning directory #7 '/usr/lib/pkgconfig'
File 'ibus-table.pc' appears to be a .pc file


rtmistler 04-25-2019 01:47 PM

Quote:

Originally Posted by AnneRanch (Post 5988467)
Could somebody help me to figure out where is the problem?

Code:

Cannot open directory #2 '/usr/local/lib/arm-linux-gnueabihf/pkgconfig' in package search path: No such file or directory
Cannot open directory #3 '/usr/local/arm-linux-gnueabihf/lib/pkgconfig' in package search path: No such file or directory
Cannot open directory #4 '/usr/local/share/pkgconfig' in package search path: No such file or directory
Cannot open directory #5 '/usr/lib/arm-linux-gnueabihf/pkgconfig' in package search path: No such file or directory
Cannot open directory #6 '/usr/arm-linux-gnueabihf/lib/pkgconfig' in package search path: No such file or directory


pan64 04-25-2019 01:48 PM

no, it does not try to create them (but use). It assumes they exist and could not be found.

AnneRanch 04-25-2019 03:41 PM

Quote:

Originally Posted by pan64 (Post 5988482)
no, it does not try to create them (but use). It assumes they exist and could not be found.

Thanks,
What confuses me is the "add" , it apparently does not "add" but only "includes" according what PKG_CONFIG_LIBDIR created. So logically the physical directories must be crated BEFORE or same time.
But I do not see any code doing so.
I need to take a closer look at code before /usr/bin/arm-linux-gnueabihf-pkg-config is run.

AnneRanch 04-27-2019 11:34 AM

OK, the consensus is that I am missing the code to build the needed directories.
To do so I need to find out HOW the published source code actually builds / implements the subscript "arm-linux-gnueabihf-pkg-config" which builds the PKG_CONFIG_LIBDIR variables needed for host crosscompliling.
Back to "download source for bluez".

AnneRanch 04-28-2019 12:23 PM

Update
Apparently the "magical" arm-linux-gnueabihf-pkg-config "wrapper" is a product of OS (?).
Here is yet another well documented (!) version from "github".

It is still unclear from where did the original version I have been struggling with came from.

I'll give this one a try to see if it actually builds the required directories and NOT JUST the PKG_CONFIG_LIBDIR which adds reference only.




Quote:

#!/bin/sh
#
# Wrapper script that calls the real pkg-config with the relocated
# sysroot location
#
set -e

GCC="${0%%-pkg-config}-gcc"
MACHINE=`"$GCC" -dumpmachine`
SYSROOT=`"$GCC" -print-sysroot`

export PKG_CONFIG_DIR=
export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/${MACHINE}/pkgconfig":"${SYSROOT}/usr/lib/pkgconfig":"${SYSROOT}/usr/share/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"

exec "$0-real" "$@"



HappyTux 04-28-2019 01:17 PM

Quote:

Originally Posted by AnneRanch (Post 5989255)
Update
Apparently the "magical" arm-linux-gnueabihf-pkg-config "wrapper" is a product of OS (?).
Here is yet another well documented (!) version from "github".

It is still unclear from where did the original version I have been struggling with came from.

I'll give this one a try to see if it actually builds the required directories and NOT JUST the PKG_CONFIG_LIBDIR which adds reference only.

It does not build any directories, it just searches for and adds them if found so they can be used in the make step which does actually build something. It appears you have not built a lot of software from source before. Your problem with the first attempt was it could not find the /usr/local/lib/arm-linux-gnueabihf/pkgconfig as it appears you have not install this required item(s). If it tells you the same again then you have missed installing a required package or it is installed in a location not in the search path like the original error told you.

AnneRanch 04-28-2019 01:47 PM

Quote:

Originally Posted by HappyTux (Post 5989260)
It does not build any directories, it just searches for and adds them if found so they can be used in the make step which does actually build something. It appears you have not built a lot of software from source before. Your problem with the first attempt was it could not find the /usr/local/lib/arm-linux-gnueabihf/pkgconfig as it appears you have not install this required item(s). If it tells you the same again then you have missed installing a required package or it is installed in a location not in the search path like the original error told you.

I just realized that I am still working with unknown source "wrapper" which builds the required references and NOT with pkg-config package.

As far as your comments goes.
I will repeat - the "wrapper " builds the references from scratch.
I could post the code to try to convince you, but why since you have indicated that I do not know what I am doing -in so may words. So why bother.

The main configure script works just fine when run for native architecture.
There is NOTHING missing in as far as pkg-config PACKAGE goes.

The "host" references are added by the wrapper script and the wrapper itself attempts to make use of them physically hence the physical directories should be build by the wrapper , before the flow is passed to standard pkg-config and then to the main script.

Thanks for all your constructive comments , I do appreciate your time and input.

I really need to find out the original source of the "host" sub-script.

astrogeek 04-28-2019 03:14 PM

Quote:

Originally Posted by HappyTux (Post 5989260)
If it tells you the same again then you have missed installing a required package or it is installed in a location not in the search path like the original error told you.

Quote:

Originally Posted by AnneRanch (Post 5989272)
I will repeat - the "wrapper " builds the references from scratch.
I could post the code to try to convince you, but why since you have indicated that I do not know what I am doing -in so may words. So why bother.

AnneRanch - Rude, dismissive replies to other members who have been kind enough to consider your problem and offer sound comments and advice will not be tolerated in this forum.

Please review the Site FAQ for guidance in posting your questions and general forum usage. From that page...

Quote:

If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere.
Please make the effort and be warned that one more time will result in issuance of an infraction.

AnneRanch 04-28-2019 08:14 PM

As suspected ( from get go) , the arm-linux-gnueabihf-pkg-config wrapper script causes "addition" of several path to directory "pkgconfig". Reasonable - it makes "configure" pretty versatile.
One of them , the original default, does contain the required pkg-config package *.pc file.
The PKG_CONFIG_DEBUG_SPEW option reports both success and failures in locating the required *.pc file scanning ALL of these directories. .
In my case verifying the actuall pkg_config package version , verification being part of the "configure" process, was reporting success, and the failure to find another *.pc file.

Thanks for helping me to stay on course.


All times are GMT -5. The time now is 03:54 AM.