Commit 0770fbe4 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/osie-coupler: fix compilation

We need to fix the rpath to pass the software release test.
parent 51121f1f
Pipeline #26348 failed with stage
[buildout] [buildout]
extends =
../cmake/buildout.cfg
parts = mbedtls parts = mbedtls
[mbedtls] [mbedtls]
...@@ -6,5 +8,8 @@ recipe = slapos.recipe.cmmi ...@@ -6,5 +8,8 @@ recipe = slapos.recipe.cmmi
url = https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.28.2.tar.gz url = https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v2.28.2.tar.gz
md5sum = 421c47c18ef46095e3ad38ffc0543e11 md5sum = 421c47c18ef46095e3ad38ffc0543e11
shared = true shared = true
configure-command = echo configure-command = cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On -DCMAKE_INSTALL_PREFIX=
make-targets = install DESTDIR=@@LOCATION@@ environment =
PATH=${cmake:location}/bin:%(PATH)s
LDFLAGS=-Wl,-rpath=@@LOCATION@@/lib/
make-targets = install DESTDIR=@@LOCATION@@
[buildout] [buildout]
parts = parts =
mbedtls
open62541 open62541
compile-coupler compile-coupler
slapos-cookbook slapos-cookbook
...@@ -12,11 +11,6 @@ extends = ...@@ -12,11 +11,6 @@ extends =
../../component/open62541/buildout.cfg ../../component/open62541/buildout.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
# we need to build mbedtls as a shared library
[mbedtls]
recipe = slapos.recipe.cmmi
configure-command = ${cmake:location}/bin/cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On -DCMAKE_INSTALL_PREFIX=
# we need open62541's sources even after compiling and linking in [open62541] # we need open62541's sources even after compiling and linking in [open62541]
# section. Reasons is that coupler's C application depends on it. # section. Reasons is that coupler's C application depends on it.
...@@ -43,6 +37,8 @@ configure-options = ...@@ -43,6 +37,8 @@ configure-options =
-DMBEDCRYPTO_LIBRARY=${mbedtls:location}/lib/libmbedcrypto.so -DMBEDCRYPTO_LIBRARY=${mbedtls:location}/lib/libmbedcrypto.so
-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON
-DUA_ENABLE_PUBSUB_MQTT=ON -DUA_ENABLE_PUBSUB_MQTT=ON
environment +=
LDFLAGS=-L${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib
[osie-repository] [osie-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -53,11 +49,11 @@ revision = 524eff9cf3461983fb391eb6912d1a21585573a9 ...@@ -53,11 +49,11 @@ revision = 524eff9cf3461983fb391eb6912d1a21585573a9
[compile-coupler] [compile-coupler]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
path = ${osie-repository:location}/coupler/opc-ua-server/ path = ${osie-repository:location}/coupler/opc-ua-server/
home = ${compile-coupler:path}/bin/ bin_dir = ${:path}/bin/
environment = environment =
OPEN62541_HOME = ${open62541:location} OPEN62541_HOME = ${open62541:location}
OPEN62541_SOURCE_HOME = ${open62541-source:location} OPEN62541_SOURCE_HOME = ${open62541-source:location}
C_COMPILER_EXTRA_FLAGS = -L ${mbedtls:location}/lib -lmbedtls -lmbedx509 -lmbedcrypto -l:libopen62541.so -L${open62541:location}/lib -I${open62541:location}/include -I${open62541-source:location}/src/pubsub/ -I${open62541-source:location}/deps C_COMPILER_EXTRA_FLAGS = -L ${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib -l:libopen62541.so -L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -I${open62541:location}/include -I${open62541-source:location}/src/pubsub/ -I${open62541-source:location}/deps
configure-command = true configure-command = true
[instance-profile] [instance-profile]
...@@ -67,8 +63,8 @@ mode = 0644 ...@@ -67,8 +63,8 @@ mode = 0644
rendered = ${buildout:directory}/instance.cfg rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
raw template_monitor ${monitor2-template:output} raw template_monitor ${monitor2-template:output}
key open62541_location open62541:location key open62541_location open62541:location
key mbedtls_location mbedtls:location key mbedtls_location mbedtls:location
key coupler_location compile-coupler:home key coupler_location compile-coupler:bin_dir
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment