library linking failing in Docker image application demo

8 posts / 0 new
Last post
Offline
Last seen: 2 years 3 months ago
Joined: 09/20/2021
Posts: 4
library linking failing in Docker image application demo

I am attempting to follow the example here but I keep getting a fail on the second docker command,

docker run -it --rm -v `pwd`:/app -w="/app" dds-build \
    make -f makefile_Values_x64Linux3gcc5.4.

The error I get is a missing library,

```

gcc -m64 -Wl,--no-as-needed   -o objs/x64Linux3gcc5.4.0/Values_subscriber objs/x64Linux3gcc5.4.0/Values_subscriber.o objs/x64Linux3gcc5.4.0/ValuesPlugin.o objs/x64Linux3gcc5.4.0/Values.o objs/x64Linux3gcc5.4.0/ValuesSupport.o -L/opt/rti_connext_dds-6.0.1/lib/x64Linux3gcc5.4.0 -lnddscz -lnddscorez -ldl -lnsl -lm -lpthread -lrt
/usr/bin/ld: cannot find -lnddscz
/usr/bin/ld: cannot find -lnddscorez
collect2: error: ld returned 1 exit status
makefile_Values_x64Linux3gcc5.4.0:90: recipe for target 'objs/x64Linux3gcc5.4.0/Values_subscriber' failed
make: *** [objs/x64Linux3gcc5.4.0/Values_subscriber] Error 1
```

I cannot find the libraries on my system. Any ideas how to solve this?

 

 

 

Offline
Last seen: 7 months 6 days ago
Joined: 05/23/2013
Posts: 64

Hi,

I assume you created "dds-build" image based on the following article. You need to have a Connext package (including the missing libraries) on your system to build the image. 
https://community.rti.com/kb/creating-docker-image-rti-connext-dds

If you could build the image, can you check the image contains the libraries that you are missing under /opt/rti_connext_dds-6.0.1/x64Linux3gcc5.4.0?

Offline
Last seen: 2 years 3 months ago
Joined: 09/20/2021
Posts: 4

Right, I followd the script in https://community.rti.com/kb/creating-docker-image-rti-connext-dds and it builds. When I look at the image in a shell there are a number of libraries installed. The installed libraries are

# cd x64Linux4gcc7.3.0
# ls
liblua.so libnddscpp2zd.a libnddsmetpzd.a librticonnextmsgcpp2zd.a librtidlcppz.a librtirecordingserviced.so librtirsinfrastructurez.a libnddsc.so libnddscppd.so libnddstransporttcp.so librticonnextmsgcppd.so librtidlcppzd.a librtirecordingservicez.a librtirsinfrastructurezd.a libnddscd.so libnddscppz.a libnddstransporttcpd.so librticonnextmsgcppz.a librtidlcz.a librtirecordingservicezd.a librtirsjniadapter.so libnddscore.so libnddscppzd.a libnddstransporttcpz.a librticonnextmsgcppzd.a librtidlczd.a librtiroutingservice.so librtirsjniadapterd.so libnddscored.so libnddscz.a libnddstransporttcpzd.a librticonnextmsgcz.a librtijniroutingservice.so librtiroutingserviced.so librtixml2.so libnddscorez.a libnddsczd.a librticonnextmsgc.so librticonnextmsgczd.a librtijniroutingserviced.so librtiroutingservicez.a librtixml2d.so libnddscorezd.a libnddsjava.so librticonnextmsgcd.so librtiddsconnectorlua.so librtimonitoring.so librtiroutingservicezd.a librtixml2z.a libnddscpp.so libnddsjavad.so librticonnextmsgcpp.so librtidlc.so librtimonitoringd.so librtirsassigntransf.so librtixml2zd.a libnddscpp2.so libnddsmetp.so librticonnextmsgcpp2.so librtidlcd.so librtimonitoringz.a librtirsassigntransfd.so libnddscpp2d.so libnddsmetpd.so librticonnextmsgcpp2d.so librtidlcpp.so librtimonitoringzd.a librtirsinfrastructure.so libnddscpp2z.a libnddsmetpz.a librticonnextmsgcpp2z.a librtidlcppd.so librtirecordingservice.so librtirsinfrastructured.so


What can I do from here?

Offline
Last seen: 2 years 3 months ago
Joined: 09/20/2021
Posts: 4

Ok, well, I figured some things out ... still need HELP!!! :(

I have x64Linux4gcc7.3.0.rtipkg sot the platform is 7.3.0. When I try to build on this platform I get an error,

ERROR com.rti.ndds.nddsgen.Main Fail: com.rti.ndds.nddsgen.Main$ArgumentException: rtiddsgen can not generate build/project files for the architecture: x64Linux3gcc7.3.0 rtiddsgen version 3.0.1

This error now comes on the command:

docker run -it --rm -v `pwd`:/app -w="/app" dds-build rtiddsgen Values.idl -ppDisable -language C -create typefiles -create examplefiles -create makefiles -platform x64Linux3gcc7.3.0


How can I build with this platform?

Offline
Last seen: 7 months 6 days ago
Joined: 05/23/2013
Posts: 64

Hi,

Looks like you have the library files in the image, but you use a different architecture (x64Linux4gcc7.3.0) from one that you used for makefile (x64Linux3gcc5.4.0). 

Can you try to generate an example with the architecture you use? 

$ docker run -it --rm -v `pwd`:/app -w="/app" dds-build \
    rtiddsgen Values.idl -ppDisable -language C \
    -create typefiles -create examplefiles -create makefiles \
    -platform x64Linux4gcc7.3.0

 

Offline
Last seen: 7 months 6 days ago
Joined: 05/23/2013
Posts: 64

Can you try it with x64Linux4gcc7.3.0 (not x64Linux3gcc7.3.0)?

Offline
Last seen: 2 years 3 months ago
Joined: 09/20/2021
Posts: 4

It worked :)

Offline
Last seen: 7 months 6 days ago
Joined: 05/23/2013
Posts: 64

Great!