Labels

Android (1) bash (2) boost (2) C (34) C++ (2) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) Docker (1) Dreamweaver (2) Eclipse (3) fail2ban (4) git (5) GitHub (4) Hacking (3) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (30) javascript (3) Linux (164) Mac (19) Machine Learning (1) mySQL (47) Netbeans (4) Networking (1) Nexus (1) OpenVMS (6) Oracle (1) Pandas (3) php (16) Postgresql (8) Python (9) raid (1) RedHat (14) Samba (2) Slackware (45) SQL (14) svn (1) tar (1) ThinkPad (1) Virtualbox (3) Visual Basic (1) Visual Studio (1) Windows (2)

Wednesday 6 January 2021

Problem building meslink

I had trouble building mesllink using Netbeans but note that it did build correctly from the original source on the box, from the command line by running make.

This is similar to a problem I had with mesdb detailed here. (worth reading first).

This particular issue came to light when trying to rebuild remotely from home, using Netbeans connected to FEC-A and in order to get around it on that occasion, I built using make from the command line, which was fine.

So, I setup the environment on my Mac connecting remotely to my restored FEC-A VM and also thou initially, there were lots of other build issues, I temporarily removed the offending lines from the code just to resolve this current issue.

The offending lines were I believe relating to shared memory areas not yet setup on the VM that I was running.


The original build failure on my laptop was as below;

Copying project files to /home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/ at plisken@23.128.28.24
cd '/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink'
/usr/bin/make -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk /home/plisken/PROJECTS/bin/meslink
make[2]: Entering directory `/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink'
mkdir -p build/Debug/GNU-Linux
rm -f "build/Debug/GNU-Linux/meslink.o.d"
g++    -c -g -w -I../../include -I/pcli/include -I/usr/include/mysql -I/usr/include/mysql++ -I/install/tinyxpath -MMD -MP -MF "build/Debug/GNU-Linux/meslink.o.d" -o build/Debug/GNU-Linux/meslink.o meslink.cpp
make[2]: *** No rule to make target `../../lib/libxpath.a', needed by `/home/plisken/PROJECTS/bin/meslink'.  Stop.
make[2]: Leaving directory `/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1m 2s)


The concern was the ../../lib/libxpath.a

After setting up the environment on my Mac and removing the previously mentioned offending lines of code, I got similar build failures as per the above.

For reference, a successful build on the restored FEC-A VM from the command line is as below;



My attention was drawn to the line;

g++ -o /app/bin/meslink build/Debug/GNU-Linux/meslink.o -lm -lpthread /pcli/library/libcore.a /pcli/library/libsdd.a -lmysqlpp ../../lib/libxpath.a -lxm12

noting that we did not have a ../../lib/libxpath.a relative to our source (we did originally and from the command line in /app/lib given our source was /app/src/meslink/).

Our source now resided in;

/home/plisken/.netbeans/remote/23.128.28.24/morpheus-Linux-x86_64/media/plisken/D_SLAVE/PROJECTS/meslink


or on the VM;

/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink


If we look at the screen below, we can see that it is indeed looking in ../../lib/libxpath.a



Anyway, while the above is academic, we need to make the changes so that this libxpath.a is found and this was done as per the screen shot2 below;





Editing the above so that it was as shown, assuming that /app/lib/libxpath.a exists in this location.

If we finally now check the Debug -Additional Options again as below, we will now see that it has been corrected, now pointing to the absolute path /app/lib/libxpath.a and should build.



and indeed it did, with the build output as below;

Copying project files to /root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64 at root@restored-fec-a.shared
Building project files list...
Checking directory structure...
Checking previously uploaded files...
Checking links...
Uploading changed files:
Zipping 4 changed files...
Uploading zip to root@restored-fec-a.shared...
Unzipping changed files...
Checking exec permissions...
Uploading changed files finished successfully.

cd '/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink'
/usr/bin/make -f Makefile CONF=Debug
make: Warning: File `nbproject/private/Makefile-variables.mk' has modification time 3.2e+07 s in the future
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink'
make[1]: Warning: File `nbproject/private/Makefile-variables.mk' has modification time 3.2e+07 s in the future
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk /app/bin/meslink
make[2]: Entering directory `/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink'
make[2]: Warning: File `nbproject/private/Makefile-variables.mk' has modification time 3.2e+07 s in the future
mkdir -p build/Debug/GNU-Linux
rm -f "build/Debug/GNU-Linux/meslink.o.d"
g++    -c -g -w -I../../include -I/pcli/include -I/usr/include/mysql -I/usr/include/mysql++ -I/install/tinyxpath -MMD -MP -MF "build/Debug/GNU-Linux/meslink.o.d" -o build/Debug/GNU-Linux/meslink.o meslink.cpp
mkdir -p /app/bin
g++     -o /app/bin/meslink build/Debug/GNU-Linux/meslink.o -lm -lpthread /pcli/library/libcore.a /pcli/library/libsdd.a -lmysqlpp /app/lib/libxpath.a -lxml2
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
make[2]: Leaving directory `/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink'
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Leaving directory `/root/.netbeans/remote/restored-fec-a.shared/solaros.local-MacOSX-x86_64/Users/plisken/pCloud Drive/Dalzell/meslink'
make: warning:  Clock skew detected.  Your build may be incomplete.

BUILD SUCCESSFUL (total time: 23s)






No comments:

Post a Comment

Note: only a member of this blog may post a comment.