-
Notifications
You must be signed in to change notification settings - Fork 571
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
Wizard recipe: ZXing_CPP-v2.3.0 #10360
Wizard recipe: ZXing_CPP-v2.3.0 #10360
Conversation
Following platforms failed to build
macOS failed with |
@giordano Your input will be greatly helpful to resolve MacOS bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macOS failed with
error: no member named 'ranges' in namespace 'std'
error
I don't know, perhaps you need a newer SDK, can't investigate further now.
Thanks for your input. |
Just to give the first example I found https://github.com/JuliaPackaging/Yggdrasil/blob/927a6c12efbee629d2a2b0364095885a0c955a3a/F/FFMPEG/common.jl but you need first to figure out what's the minimum macOS SDK version which ships a libc++ which provides the feature you need. |
Z/ZXing_CPP/build_tarballs.jl
Outdated
filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms) | ||
filter!(p -> arch(p) != "riscv64", platforms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these are excluded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They failed to build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add a comment to the build script with the error message? That will help later readers of the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments with error messages.
Z/ZXing_CPP/build_tarballs.jl
Outdated
|
||
# aarch64-unknown-freebsd failed with "error: reference to '__builtin_va_list' is ambiguous" | ||
filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms) | ||
# riscv64-linux-gnu failed with "warning: libstdc++.so.6, needed by ../../core/libZXing.so.2.3.0, not found" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please post here the full error message? This doesn't look hard to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
riscv64-linux-gnu :
[ 99%] Linking C executable ZXingCTest
cd /workspace/srcdir/zxing-cpp/build/wrappers/c && /usr/bin/cmake -E cmake_link_script CMakeFiles/ZXingCTest.dir/link.txt --verbose=1
/opt/bin/riscv64-linux-gnu-libgfortran5-cxx11/riscv64-linux-gnu-gcc --sysroot=/opt/riscv64-linux-gnu/riscv64-linux-gnu/sys-root/ -O3 -DNDEBUG CMakeFiles/ZXingCTest.dir/ZXingCTest.c.o -o ZXingCTest -Wl,-rpath,/workspace/srcdir/zxing-cpp/build/core ../../core/libZXing.so.2.3.0
/opt/riscv64-linux-gnu/bin/../lib/gcc/riscv64-linux-gnu/14.2.0/../../../../riscv64-linux-gnu/bin/ld: warning: libstdc++.so.6, needed by ../../core/libZXing.so.2.3.0, not found (try using -rpath or -rpath-link)
aarch64-unknown-freebsd :
/opt/x86_64-linux-musl/lib/clang/18/include/__stdarg_va_list.h:12:9: error: reference to '__builtin_va_list' is ambiguous
12 | typedef __builtin_va_list va_list;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What version of BinaryBuilderBase
are you using?
]status -m BinaryBuilderBase
We are already adding the directory where libstdc++ should be to rpath: https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/ccbbf3743e697e256308040fbe964b86e1fade16/src/Runner.jl#L572-L578
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status `~/.julia/environments/v1.7/Manifest.toml`
[7f725544] BinaryBuilderBase v1.35.1
Other executables written in C++ linked successfully, But ZXingCTest executable which is written in C failed to link with libZXing.so.2.3.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason libstdc++ ended up again in lib
instead of lib64
for riscv64....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the time being can't you just disable building ZXingCTest
? I don't see it in the tarball, doesn't look useful, is it?
@giordano all platforms build successfully. Waiting for review. |
I'm waiting for JuliaPackaging/BinaryBuilderBase.jl#407 to finish running tests, so we can remove all the workarounds, JuliaPackaging/BinaryBuilderBase.jl#408 already fixes aarch64-freebsd |
You should be able to remove all the workarounds now. |
Z/ZXing_CPP/build_tarballs.jl
Outdated
if [[ "$target" == aarch64-unknown-freebsd* ]]; then | ||
export CXXFLAGS="-isystem /opt/${target}/${target}/sys-root/usr/include" | ||
fi | ||
|
||
# To-Do: remove it after https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/407 merged | ||
if [[ "$target" == riscv64-linux-gnu ]]; then | ||
export LDFLAGS="-lstdc++" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ "$target" == aarch64-unknown-freebsd* ]]; then | |
export CXXFLAGS="-isystem /opt/${target}/${target}/sys-root/usr/include" | |
fi | |
# To-Do: remove it after https://github.com/JuliaPackaging/BinaryBuilderBase.jl/pull/407 merged | |
if [[ "$target" == riscv64-linux-gnu ]]; then | |
export LDFLAGS="-lstdc++" | |
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes are done.
@giordano thanks for all your inputs. Now I am going to write Julia wrapper around this. |
This pull request contains a new build recipe I built using the BinaryBuilder.jl wizard:
@staticfloat please review and merge.