Application Build Issue - Very Weird

Stephen Beckwith embeddedsteve at gmail.com
Tue Jan 6 19:15:44 UTC 2015


Greetings,
  I am directing this inquiry to the LXDE folks, since this is where I'm
having my problem/issue.  Please indulge me for a moment while I explain
(being a fellow SW developer, I understand the importance of details).

*Setup:*
 -  I'm running 2 VirtualBox Virtual Machines:  One is the "stock"
FedoraCore 21 release, the other is an LXDE Spin of the same release.
 -  The HOST OS for this is Mac OS X 10.10 Yosemite.  (15" MacBook Pro
Retina w/16GB RAM, 512GB SSD)
 -  Both Virtual Machines are setup IDENTICALLY with respect to the # of
CPU's (2), and the allocated Memory (8GB).
 -  Both VM's share the same "shared folder" on disk.
 -  Storage for the VDI images is on a USB3 external HDD (slow I know, but
works OK)
 -  The kernel version is:  {same on BOTH VM's}

[sbeckwith at localhost ~]$ uname -a

Linux localhost.localdomain 3.17.4-301.fc21.x86_64 #1 SMP Thu Nov 27
19:09:10 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[sbeckwith at localhost ~]$


*What I'm trying to do:*
 -  I'm building test software that is comprised of a Linux kernel (older
2.6.32 vintage) with an RFS containing the necessary
drivers/utilities/libraries and test applications for running diagnostics
on an X86_64 CPU.

*My Problem:*
 -  When I built the software on the FC21 machine, it runs fine, to
completion.
 -  When I build the EXACT SAME software in the LXDE version, I get a
failure.
Where the problem is a linking issue when trying to link the PCI library
(libpci.so.3.3.0) with the application.  LD reports it can't find the -lpci
library.

Since this is building a stand-alone application, I was able to execute the
build command on the command line to generate the attached "verbose"
output, without the need of the top level build stuff.

*Details:*
 -  Attached are 2 text files:
*FC21-Bld.txt* - the verbose output from the command line command to build
this application.   As shown in the "ls-l" at the bottom, the "pcix"
application was successfully built.
*FC-LXDE-Bld.txt* - the verbose output from the command line command to
build this application on the LXDE VM.  Here, it generates an error.
*BldDiff-1.txt* - the difference between the two files (from DiffMerge) -
The ONLY difference I can see (other than the order of the command line
parameters, which should not be an issue) are the temporary files
generated.  The -L switches in BOTH cases are the same, and will point to
the /lib64 where this library resides.
So. . .   Why does one work and the other one doesn't?  Given that I can
reproduce this on the command line in my mind rules out any sort of race
condition between the builds.   It would point to some underlying issue
with how the link paths are handled somehow, so that in once case it works,
and the other it does not.
In my 30+ years of "embedded" software development, I've see some
interesting build issues, but this one takes the cake.

Any suggestions/pointers/hints would be GREATLY appreciated.  I'm at my
whits end here. . .

Warmest Regards,
Stephen Beckwith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/lxde/attachments/20150106/a4449a93/attachment.html>
-------------- next part --------------
1c1
< [sbeckwith at localhost pci_mem_acc]$ /usr/bin/gcc -v -lpci -L/lib64 -o pcix ./pci_mem_acc.c
---
> [sbeckwith at localhost pci_mem_acc]$ /usr/bin/gcc -lpci -v -L/lib64 -o pcix ./pci_mem_acc.c
10c10
<  /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/cc1 -quiet -v ./pci_mem_acc.c -quiet -dumpbase pci_mem_acc.c -mtune=generic -march=x86-64 -auxbase pci_mem_acc -version -o /tmp/ccGw2jOL.s
---
>  /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/cc1 -quiet -v ./pci_mem_acc.c -quiet -dumpbase pci_mem_acc.c -mtune=generic -march=x86-64 -auxbase pci_mem_acc -version -o /tmp/ccS01ijk.s
27c27
<  as -v --64 -o /tmp/cc667Qyl.o /tmp/ccGw2jOL.s
---
>  as -v --64 -o /tmp/ccYee0ip.o /tmp/ccS01ijk.s
32,45c32,34
<  /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb2SlkV.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o pcix /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. -lpci /tmp/cc667Qyl.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
< [sbeckwith at localhost pci_mem_acc]$ ls -l
< total 148
< -rwxrwxr-x. 1 sbeckwith sbeckwith 62664 Dec 12 08:52 header.h
< -rwxrwxr-x. 1 sbeckwith sbeckwith  3892 Dec 12 08:52 Makefile
< -rwxrwxr-x. 1 sbeckwith sbeckwith  9244 Dec 12 08:52 pci_lib.h
< -rwxrwxr-x. 1 sbeckwith sbeckwith 18373 Jan  5 16:36 pci_mem_acc
< -rwxrwxr-x. 1 sbeckwith sbeckwith 17180 Dec 12 08:52 pci_mem_acc.c
< -rwxrwxr-x. 1 sbeckwith sbeckwith  3607 Dec 12 08:52 pci_mem_acc.h
< -rwxrwxr-x. 1 sbeckwith sbeckwith 18373 Jan  6 12:42 pcix
< -rwxrwxr-x. 1 sbeckwith sbeckwith  1486 Dec 12 08:52 types.h
< 
< 
< 
---
>  /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7qxFju.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o pcix /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. -lpci /tmp/ccYee0ip.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
> /bin/ld: cannot find -lpci
> collect2: error: ld returned 1 exit status
-------------- next part --------------
[sbeckwith at localhost pci_mem_acc]$ /usr/bin/gcc -v -lpci -L/lib64 -o pcix ./pci_mem_acc.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/cc1 -quiet -v ./pci_mem_acc.c -quiet -dumpbase pci_mem_acc.c -mtune=generic -march=x86-64 -auxbase pci_mem_acc -version -o /tmp/ccGw2jOL.s
GNU C (GCC) version 4.9.2 20141101 (Red Hat 4.9.2-1) (x86_64-redhat-linux)
	compiled by GNU C version 4.9.2 20141101 (Red Hat 4.9.2-1), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/include
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.9.2 20141101 (Red Hat 4.9.2-1) (x86_64-redhat-linux)
	compiled by GNU C version 4.9.2 20141101 (Red Hat 4.9.2-1), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 03cfec3867418ce243292e9ba51d447c
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/cc667Qyl.o /tmp/ccGw2jOL.s
GNU assembler version 2.24 (x86_64-redhat-linux) using BFD version version 2.24
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb2SlkV.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o pcix /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. -lpci /tmp/cc667Qyl.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
[sbeckwith at localhost pci_mem_acc]$ ls -l
total 148
-rwxrwxr-x. 1 sbeckwith sbeckwith 62664 Dec 12 08:52 header.h
-rwxrwxr-x. 1 sbeckwith sbeckwith  3892 Dec 12 08:52 Makefile
-rwxrwxr-x. 1 sbeckwith sbeckwith  9244 Dec 12 08:52 pci_lib.h
-rwxrwxr-x. 1 sbeckwith sbeckwith 18373 Jan  5 16:36 pci_mem_acc
-rwxrwxr-x. 1 sbeckwith sbeckwith 17180 Dec 12 08:52 pci_mem_acc.c
-rwxrwxr-x. 1 sbeckwith sbeckwith  3607 Dec 12 08:52 pci_mem_acc.h
-rwxrwxr-x. 1 sbeckwith sbeckwith 18373 Jan  6 12:42 pcix
-rwxrwxr-x. 1 sbeckwith sbeckwith  1486 Dec 12 08:52 types.h


-------------- next part --------------
[sbeckwith at localhost pci_mem_acc]$ /usr/bin/gcc -lpci -v -L/lib64 -o pcix ./pci_mem_acc.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/cc1 -quiet -v ./pci_mem_acc.c -quiet -dumpbase pci_mem_acc.c -mtune=generic -march=x86-64 -auxbase pci_mem_acc -version -o /tmp/ccS01ijk.s
GNU C (GCC) version 4.9.2 20141101 (Red Hat 4.9.2-1) (x86_64-redhat-linux)
	compiled by GNU C version 4.9.2 20141101 (Red Hat 4.9.2-1), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/include
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.9.2 20141101 (Red Hat 4.9.2-1) (x86_64-redhat-linux)
	compiled by GNU C version 4.9.2 20141101 (Red Hat 4.9.2-1), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 03cfec3867418ce243292e9ba51d447c
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccYee0ip.o /tmp/ccS01ijk.s
GNU assembler version 2.24 (x86_64-redhat-linux) using BFD version version 2.24
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-L/lib64' '-o' 'pcix' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7qxFju.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o pcix /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. -lpci /tmp/ccYee0ip.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
/bin/ld: cannot find -lpci
collect2: error: ld returned 1 exit status


More information about the lxde mailing list