All,

Has anybody on this list managed to use the cross compilation instructions from either here:
https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
or here:
https://wiki.qt.io/RaspberryPi2EGLFS

and gotten PostgreSQL support to compile when the host is a 64-bit system and the target is 32-bit Pi?

Both the wiki and that link seem horribly broken.

You will notice the environment/path configuration is incorrect:

====

checking for PostgreSQL...

/home/roland/piBuild/pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
 -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 
-mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard 
--sysroot=/home/roland/piBuild/sysroot -O2 -Wall -W -fPIC  -I. 
-I/usr/include/postgresql -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o 
psql.o psql.cpp

/home/roland/piBuild/pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
 -Wl,-rpath-link,/home/roland/piBuild/sysroot/opt/vc/lib 
-Wl,-rpath-link,/home/roland/piBuild/sysroot/usr/lib/arm-linux-gnueabihf 
-Wl,-rpath-link,/home/roland/piBuild/sysroot/lib/arm-linux-gnueabihf 
-mfloat-abi=hard -Wl,-O1 -o psql psql.o   
--sysroot=/home/roland/piBuild/sysroot -L/usr/lib/x86_64-linux-gnu -lpq

/usr/lib/x86_64-linux-gnu/libpq.so: file not recognized: File format not 
recognized

collect2: error: ld returned 1 exit status

Makefile:92: recipe for target 'psql' failed

make: *** [psql] Error 1

PostgreSQL disabled.

PostgreSQL support cannot be enabled due to functionality tests!

 Turn on verbose messaging (-v) to 
/home/roland/piBuild/qt-everywhere-opensource-src-5.7.1/qtbase/configure to see 
the final report.

 If you believe this message is in error you may use the continue

 switch (-continue) to 
/home/roland/piBuild/qt-everywhere-opensource-src-5.7.1/qtbase/configure to 
continue.

roland@roland-desktop:~/piBuild/qt-everywhere-opensource-src-5.7.1$ cd /

roland@roland-desktop:/$ sudo find -iname libpq.so

[sudo] password for roland:

./usr/lib/x86_64-linux-gnu/libpq.so

./home/roland/piBuild/sysroot/usr/lib/arm-linux-gnueabihf/libpq.so


====

Even after the library and required headers are installed on the Pi and the entire process is started from scratch the cross compile looks in the wrong place for the header (on the 64-bit machine) and the tries to link with the 64-bit version of the lib.

Has anybody found the work around for this? Preferably a work around which does not require loop mounting the SD image.

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog
http://lesedi.us/
http://onedollarcontentstore.com

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to