Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open62541pp: new recipe #23291

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Mar 27, 2024

@conan-center-bot

This comment has been minimized.

@ErikTempelaarVO
Copy link

I used the same MPL-2.0 license as the original open62541pp-library and I believe that license allows that.
I'm pleased that this library will be in conan-center, and so does the author of the library (going by the thumbs up)

For the 0.12.0 version of the library you might need some of the changes from here:
https://github.com/oliver/open62541pp/commits/feat/conan-recipe/

@conan-center-bot

This comment has been minimized.

Build failed in C3I with IPO enabled.
@lukasberbuer
Copy link

The open62541 requirement is currently pinned to version v1.3.9. We could relax this since open62541pp supports all open62541 versions sind v1.0.

@valgur
Copy link
Contributor Author

valgur commented Mar 28, 2024

@lukasberbuer CCI does not generally allow version ranges for dependencies, unfortunately. However, consumers can still always add self.requires("open62541/1.x.y", override=True) to use a different version.

@lukasberbuer
Copy link

Ok, thanks @valgur 👍

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 4 (c55a60f5a68512f157a70bf59276e162100928a6):

  • open62541pp/0.12.0:
    CI failed to create some packages (All logs)

    Logs for packageID 927e2edf70c8a5b0cd1da5d0f47a339265b7cefd:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    open62541pp:shared=False
    
    [...]
    open62541pp/0.12.0 (test package): CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/."
    
    ----Running------
    > cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/."
    -----------------
    -- Using Conan toolchain: /home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release/generators/conan_toolchain.cmake
    -- The CXX compiler identification is GNU 11.4.0
    -- Check for working CXX compiler: /usr/local/bin/c++
    -- Check for working CXX compiler: /usr/local/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Conan: Target declared 'open62541pp::open62541pp'
    -- Conan: Target declared 'open62541::open62541'
    -- Conan: Including build module from '/home/conan/workspace/prod-v1/bsr/12322/fadda/.conan/data/open62541/1.3.9/_/_/package/75ef360a57ade25004dd5837d5c97cae478a69ec/lib/cmake/open62541/open62541Macros.cmake'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release
    open62541pp/0.12.0 (test package): CMake command: cmake --build "/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release" '--' '-j3'
    
    ----Running------
    > cmake --build "/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release" '--' '-j3'
    -----------------
    Scanning dependencies of target test_package
    [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
    [100%] Linking CXX executable test_package
    CMakeFiles/test_package.dir/build.make:85: recipe for target 'test_package' failed
    CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/test_package.dir/all' failed
    Makefile:83: recipe for target 'all' failed
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0091
    
    
    lto1: fatal error: bytecode stream in file '/home/conan/workspace/prod-v1/bsr/12322/fadda/.conan/data/open62541/1.3.9/_/_/package/75ef360a57ade25004dd5837d5c97cae478a69ec/lib/libopen62541.a' generated with LTO version 11.0 instead of the expected 11.3
    compilation terminated.
    lto-wrapper: fatal error: /usr/local/bin/c++ returned 1 exit status
    compilation terminated.
    /opt/conan/binutils/bin/ld: error: lto-wrapper failed
    collect2: error: ld returned 1 exit status
    make[2]: *** [test_package] Error 1
    make[1]: *** [CMakeFiles/test_package.dir/all] Error 2
    make: *** [all] Error 2
    open62541pp/0.12.0 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    open62541pp/0.12.0 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    ERROR: open62541pp/0.12.0 (test package): Error in build() method, line 21
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/workspace/prod-v1/bsr/cci-817b5f8a/recipes/open62541pp/all/test_package/build/Release" '--' '-j3'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (c55a60f5a68512f157a70bf59276e162100928a6):

  • open62541pp/0.12.0:
    All packages built successfully! (All logs)

@lukasberbuer
Copy link

Hi @valgur, can I support you with the IPO issue?



int main() {
opcua::Server server(4840 /* port */);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's simplify the test package not to have to use server classes - reads like this could be hitting the network layer :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does. The example is similar to the open62541 one: https://github.com/conan-io/conan-center-index/blob/master/recipes/open62541/all/test_package/test_package.c

I could provide a test without any server/client connection if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be ace yes :) thanks!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, I was wrong. The example seems to be fine. The actual server connection is only instantiated if server.run() is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can simply move the test code to a dummy function that does not get called from main().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual server connection is only instantiated if server.run() is called.

Having this as a comment in the code itself then should be enough :)

@valgur
Copy link
Contributor Author

valgur commented Apr 20, 2024

@lukasberbuer Yes, your assistance on the IPO issue would be very welcome.

@jcar87 jcar87 self-assigned this Jun 13, 2024
@lbckmnn
Copy link

lbckmnn commented Aug 30, 2024

Is someone still working on this?
Can I assist somehow?

@valgur
Copy link
Contributor Author

valgur commented Aug 30, 2024

@AbrilRBS The GCC build fails in CI with:

.conan/data/open62541/1.3.9///package/75ef360a57ade25004dd5837d5c97cae478a69ec/lib/libopen62541.a' generated with LTO version 11.0 instead of the expected 11.3

My guess is that this might be fixed by regenerating the open62541 binaries with the same newer GCC version. Can you help with that, please?

@AbrilRBS
Copy link
Member

AbrilRBS commented Aug 30, 2024

There are a few versions of that package to be built, will update this branch when the binaries have been built, thanks for the heads-up @valgur!

@AbrilRBS
Copy link
Member

Seems like some configurations are having a few issues running the tests https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/prod-v1/TapaholesRepo/135-linux-gcc11/open62541/1.2.6//summary.json but it's progressing nicely otherwise

@ErikTempelaarVO
Copy link

Looks like the problem @valgur mentioned is still there?

"lto1: fatal error: bytecode stream in file '/home/conan/workspace/prod-v1/bsr/90552/bbfdc/.conan/data/open62541/1.2.6/_/_/package/176240f9a6169082d460c41d91c4bea5bc22a932/lib/libopen62541.a' generated with LTO version 11.0 instead of the expected 11.3"

But only in profiles with

[options]
open62541:shared=False

@ErikTempelaarVO
Copy link

@AbrilRBS

What happened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[request] open62541pp/0.4.1
7 participants