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

yaml_cpp: Changed recipe to build v0.5.3 #7591

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

stemann
Copy link
Contributor

@stemann stemann commented Oct 28, 2023

Dependent on #7592

Edit: Or alternatively - instead of another boost version - the included patch.

@stemann stemann force-pushed the feature/yaml_cpp_v0.5 branch 4 times, most recently from 0c1da85 to 364a4d8 Compare October 28, 2023 18:32
@imciner2
Copy link
Member

Why do you want to downgrade this library?

@stemann
Copy link
Contributor Author

stemann commented Oct 30, 2023

I need this older version in order to get Pleora eBUS (for JAI) Runtime/SDK to pass, cf. pages 4-5 on https://www.jai.com/uploads/documents/Software/SDK-eBUS/eBUS-SDK-for-JAI-RevisionNote_6-3-1.pdf (I will also need v0.6 at some point)

I'm building the eBUS library in a private repo. as the (re-)distribution rights are not crystal clear...

@eschnett
Copy link
Contributor

It does not make sense to downgrade the default versions of yaml_cpp or Boost. Since this seems to be for a private package I recommend creating new packages called yaml_cpp_5_3 and Boost_1_66 to handle these dependencies. You can then even build and deploy these yourself, you don't need to wait for these to become official Julia packages.

@stemann
Copy link
Contributor Author

stemann commented Oct 30, 2023

Why? (edit: wrt. sensibility of downgrading recipes (temporarily))

It is quite straight forward to roll back the recipe to get previous versions, and then subsequently update the recipe to release e.g. yaml_cpp v0.8.

Users without compat will get the same default v0.7 (or v0.8).

@stemann
Copy link
Contributor Author

stemann commented Oct 31, 2023

Not sure how to fix no std::auto_ptr found for FreeBSD.... Fixed.

@stemann stemann marked this pull request as ready for review October 31, 2023 04:03
@stemann stemann force-pushed the feature/yaml_cpp_v0.5 branch from 5a64152 to bc3aa0c Compare October 31, 2023 10:38
@stemann
Copy link
Contributor Author

stemann commented Oct 31, 2023

LGTM :-)

]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
dependencies = [
Dependency("boost_jll", v"1.79.0"),
Copy link
Member

Choose a reason for hiding this comment

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

boost requires a compat with exactly a single version: #3024

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Not completely sure whether a BuildDependency would be enough here, but there is no warnings or errors from audit on x86_64-linux-gnu-cxx11 with just:

    BuildDependency(PackageSpec("boost_jll", v"1.76.0")),

Copy link
Member

Choose a reason for hiding this comment

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

Ah, if you don't link to any boost library then a build-dep is fine, some components are headers-only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, judging from CMakeLists.txt, it also looks like there is no linking with boost...

... and Debian agrees that boost is a build-time dependency: https://salsa.debian.org/debian/yaml-cpp/-/blob/56d05874c8068235cc904370c209e459914ff1e8/debian/control#L9

Copy link
Member

Choose a reason for hiding this comment

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

You can see if the output library links to boost (I'm away from computer, I can't)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to being a BuildDependency - with the same version (v1.76.0).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pending: Will check if it links to boost (but I guess audit would’ve caught that?)

Copy link
Member

Choose a reason for hiding this comment

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

(but I guess audit would’ve caught that?)

Not really, because the library is there during audit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK - it looks boost-free:

/workspaces/Yggdrasil/Y/yaml_cpp# julia --project=../../.ci --color=yes build_tarballs.jl --verbose --debug=end x86_64-linux-gnu-cxx11
...

sandbox:${WORKSPACE}/srcdir/yaml-cpp/build # ls -la $libdir/libyaml-cpp*
lrwxrwxrwx    1 root     root            18 Oct 31 17:43 /workspace/destdir/lib/libyaml-cpp.so -> libyaml-cpp.so.0.5
lrwxrwxrwx    1 root     root            20 Oct 31 17:43 /workspace/destdir/lib/libyaml-cpp.so.0.5 -> libyaml-cpp.so.0.5.3
-rwxr-xr-x    1 root     root        571696 Oct 31 17:43 /workspace/destdir/lib/libyaml-cpp.so.0.5.3

sandbox:${WORKSPACE}/srcdir/yaml-cpp/build # ldd $libdir/libyaml-cpp.so.0.5.3
        linux-vdso.so.1 (0x00007ffe23a9f000)
        libstdc++.so.6 => /usr/lib/csl-glibc-x86_64/libstdc++.so.6 (0x00007f6c76f02000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6c76e28000)
        libgcc_s.so.1 => /usr/lib/csl-glibc-x86_64/libgcc_s.so.1 (0x00007f6c76e0d000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6c76c11000)
        ldd (0x00007f6c77393000)

🚀

@stemann stemann force-pushed the feature/yaml_cpp_v0.5 branch from bc3aa0c to f8344db Compare October 31, 2023 14:20
Including:
* Added boost_jll as a build dep.
* Replaced GitHub automatic archive source with git source.
* Added patch for obsolete boost/detail/iterator header.
* Fixed Windows library name.
* Fixed Clang platforms by enabling C++17 removed features - to get support for std::auto_ptr
@stemann stemann force-pushed the feature/yaml_cpp_v0.5 branch from f8344db to 6c2881f Compare October 31, 2023 14:56
Copy link
Member

Choose a reason for hiding this comment

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

Where does this patch come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My hack to avoid being dependent on boost < v1.70 (I.e. making #7592 superfluous): I believe Boost v1.70 removed this method - as it was moved to std?

Similar approach: https://stackoverflow.com/a/49937378/1713725

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced the hack with a more solid patch - based on https://www.mail-archive.com/[email protected]/msg1644546.html

@stemann
Copy link
Contributor Author

stemann commented Nov 1, 2023

Hmm... running the included tests (with YAML_CPP_BUILD_TOOLS=ON - on x86_64-linux-gnu-cxx11) fails with a segmentation fault at the same spot as in jbeder/yaml-cpp#394:

sandbox:${WORKSPACE}/srcdir/yaml-cpp/build_release # gdb ./test/run-tests
...
Reading symbols from ./test/run-tests...
(gdb) run
Starting program: /workspace/srcdir/yaml-cpp/build_release/test/run-tests 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[==========] Running 876 tests from 11 test cases.
[----------] Global test environment set-up.
...
[----------] 3 tests from HandlerTest
[ RUN      ] HandlerTest.NoEndOfMapFlow

Program received signal SIGSEGV, Segmentation fault.
0x000000000043b05c in YAML::MockEventHandler::OnDocumentStart(YAML::Mark const&) ()

Changing the Release config from -O2 to -O1 or -Og does not change this outcome.

However, a Debug build does not segfault:

sandbox:${WORKSPACE}/srcdir/yaml-cpp/build # ./test/run-tests 
[==========] Running 876 tests from 11 test cases.
[----------] Global test environment set-up.
...
[----------] Global test environment tear-down
[==========] 876 tests from 11 test cases ran. (265 ms total)
[  PASSED  ] 876 tests.

  YOU HAVE 8 DISABLED TESTS

🤔 ...

@stemann
Copy link
Contributor Author

stemann commented Nov 1, 2023

Hmm... running the included tests (with YAML_CPP_BUILD_TOOLS=ON - on x86_64-linux-gnu-cxx11) fails with a segmentation fault at the same spot as in jbeder/yaml-cpp#394:

Never mind: It was apparently an issue with gmock on GCC v6: Fixed by the patch in jbeder/yaml-cpp#514

@stemann
Copy link
Contributor Author

stemann commented Nov 1, 2023

LGTM :-)

@giordano giordano merged commit cb7ab86 into JuliaPackaging:master Nov 1, 2023
@stemann stemann deleted the feature/yaml_cpp_v0.5 branch November 1, 2023 17:03
amontoison pushed a commit to amontoison/Yggdrasil that referenced this pull request Nov 27, 2023
* yaml_cpp: Changed recipe to build v0.5.3

Including:
* Added boost_jll as a build dep.
* Replaced GitHub automatic archive source with git source.
* Added patch for obsolete boost/detail/iterator header.
* Fixed Windows library name.
* Fixed Clang platforms by enabling C++17 removed features - to get support for std::auto_ptr

* Rectified patch for missing <boost/next_prior.hpp> include.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants