void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.15k forks source link

Boost & aarch64 #27398

Open unspecd opened 3 years ago

unspecd commented 3 years ago

System

I'm trying to build gnucash for aarch64-musl:

[ 96%] Linking CXX executable ../bin/gnucash
/usr/lib/gcc/aarch64-linux-musl/9.3.0/../../../../aarch64-linux-musl/bin/ld: ../lib/gnucash/libgnc-csv-import.so: undefined reference to `boost::icu_regex_traits::isctype(int, unsigned long) const'
/usr/lib/gcc/aarch64-linux-musl/9.3.0/../../../../aarch64-linux-musl/bin/ld: ../lib/gnucash/libgnc-csv-import.so: undefined reference to `boost::re_detail_107200::icu_regex_traits_implementation::do_transform(int const*, int const*, icu_67::Collator const*) const'
/usr/lib/gcc/aarch64-linux-musl/9.3.0/../../../../aarch64-linux-musl/bin/ld: ../lib/gnucash/libgnc-csv-import.so: undefined reference to `boost::basic_regex<int, boost::icu_regex_traits>::do_assign(int const*, int const*, unsigned int)'

Steps to reproduce the behavior

$ cd $(xdistdir)
$ git checkout 06a99096ea
$ sed -i srcpkgs/gnucash/template -e '/nocross/d'
$ echo 'make_build_args="gnucash"' >> srcpkgs/gnucash/template
$ echo 'hostmakedepends+=" glib-devel"' >> srcpkgs/gnucash/template
$ echo 'makedepends+=" libatomic_ops-devel"' >> srcpkgs/gnucash/template
$ ./xbps-src -a aarch64-musl build gnucash
unspecd commented 3 years ago

https://github.com/void-linux/void-packages/pull/27320#issuecomment-750832289

unspecd commented 3 years ago

Here is a minimal non-working example:

// regex.cpp
#include <boost/regex.hpp>
#include <boost/regex/icu.hpp>

int main()
{
    std::string str = "";
    auto expr = boost::make_u32regex(str);
    //std::string str_no_symbols = boost::u32regex_replace(str, expr, "");

    return 0;
}

$ $(xdistdir)/masterdir/bin/aarch64-linux-musl-g++ \
    --sysroot=$(xdistdir)/masterdir/usr/aarch64-linux-musl -o regex regex.cpp -lboost_regex