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

"brew install soapyosmo" fails on MacOS Monterey and MacOS Big Sur #57

Open
righthalfplane opened this issue Jul 8, 2022 · 9 comments
Assignees

Comments

@righthalfplane
Copy link

"brew install soapyosmo" fails with a bunch of errors -

Last 15 lines from /Users/dir/Library/Logs/Homebrew/soapyosmo/02.make:
^
/usr/local/include/boost/math/tools/mp.hpp:278:29: error: a space is required between consecutive right angle brackets (use '> >')
struct mp_append_impl<L<T...>>
^
/usr/local/include/boost/math/tools/mp.hpp:284:42: error: a space is required between consecutive right angle brackets (use '> >')
struct mp_append_impl<L1<T1...>, L2<T2...>>
^
/usr/local/include/boost/math/tools/mp.hpp:291:53: error: a space is required between consecutive right angle brackets (use '> >')
struct mp_append_impl<L1<T1...>, L2<T2...>, L3<T3...>>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SoapyOsmoSDR.dir/gr-osmosdr/lib/ranges.cc.o] Error 1
make[1]: *** [CMakeFiles/SoapyOsmoSDR.dir/all] Error 2
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
soapyosmo fails to install catalina #47
[dir:~] dir%

@jphastings
Copy link

jphastings commented Nov 7, 2022

This is also happening on Ventura (macOS 13). I'm using apple silicon (an M2 chip), which might be part of the problem? (it looks like this is the same issue as #47)

I'm happy to offer help, but I'd need some guidance; I'm an experienced software engineer, but very inexperienced in the SDR space.

@jphastings
Copy link

I made some progress by adding the following lines to the formula (openned by running brew edit pothosware/pothos/soapyosmo)

fails_with :clang do
    build 1400
    cause "C syntax issue"
  end

I added this because when I check ~/Library/Logs/Homebrew/soapyosmo/02.make (the log file listed at the top of the homebrew failure), I can see a line Clang: 14.0.0 build 1400. I had a hunch that building with CLang might cause problems, and I believe this declaration allows homebrew to recognise that it would fail when building with clang, so uses gcc instead.

This resulted in a different failure, which I'm having difficulty with:

brew install pothosware/pothos/soapyosmo after edits
==> Downloading https://github.com/pothosware/SoapyOsmo/archive/soapy-osmo-0.2.5.tar.gz
Already downloaded: ~/Library/Caches/Homebrew/downloads/2e8197b694f4165dd87a5553dc686d206188a939e12652c05ab515b1b3ab9a80--SoapyOsmo-soapy-osmo-0.2.5.tar.gz
==> Installing soapyosmo from pothosware/pothos
==> cmake ..
==> make install
Last 15 lines from ~/Library/Logs/Homebrew/soapyosmo/02.make:
[ 94%] Linking CXX shared module libosmosdrSupport.so
/opt/homebrew/Cellar/cmake/3.24.2/bin/cmake -E cmake_link_script CMakeFiles/osmosdrSupport.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/g++-12 -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -bundle -Wl,-headerpad_max_install_names -o libosmosdrSupport.so "CMakeFiles/osmosdrSupport.dir/gr-osmosdr/lib/osmosdr/osmosdr_src_c.cc.o" CMakeFiles/osmosdrSupport.dir/register_osmosdr.cc.o CMakeFiles/osmosdrSupport.dir/Version.cpp.o  /opt/homebrew/lib/libosmosdr.dylib libSoapyOsmoSDR.0.2.4.dylib /opt/homebrew/lib/libboost_thread-mt.dylib /opt/homebrew/lib/libboost_system-mt.dylib /opt/homebrew/lib/libSoapySDR.0.8.1.dylib -Wl,--no-undefined -pthread -flat_namespace
ld: unknown option: --no-undefined
collect2: error: ld returned 1 exit status
make[2]: *** [libosmosdrSupport.so] Error 1
make[1]: *** [CMakeFiles/osmosdrSupport.dir/all] Error 2
[100%] Linking CXX shared module librfspaceSupport.so
/opt/homebrew/Cellar/cmake/3.24.2/bin/cmake -E cmake_link_script CMakeFiles/rfspaceSupport.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/g++-12 -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -bundle -Wl,-headerpad_max_install_names -o librfspaceSupport.so "CMakeFiles/rfspaceSupport.dir/gr-osmosdr/lib/rfspace/rfspace_source_c.cc.o" CMakeFiles/rfspaceSupport.dir/register_rfspace.cc.o CMakeFiles/rfspaceSupport.dir/Version.cpp.o  libSoapyOsmoSDR.0.2.4.dylib /opt/homebrew/lib/libboost_thread-mt.dylib /opt/homebrew/lib/libboost_system-mt.dylib /opt/homebrew/lib/libSoapySDR.0.8.1.dylib -Wl,--no-undefined -pthread -flat_namespace
ld: unknown option: --no-undefined
collect2: error: ld returned 1 exit status
make[2]: *** [librfspaceSupport.so] Error 1
make[1]: *** [CMakeFiles/rfspaceSupport.dir/all] Error 2
make: *** [all] Error 2

The key issue being --no-undefined as part of the linking process.

I've found some references with google, but not had any luck in finding a path forwards.


Somewhat dumbly declaring a failure with gcc, and running brew install llvm to see if a different compiler helps produces a new error:

  fails_with :gcc do
    cause "unknown option: --no-undefined"
  end

This produces a new error (Undefined symbols for architecture arm64: "boost::chrono::steady_clock::now()"), which I don't think is going to help.

brew install pothosware/pothos/soapyosmo after edits
==> Downloading https://github.com/pothosware/SoapyOsmo/archive/soapy-osmo-0.2.5.tar.gz
Already downloaded: ~/Library/Caches/Homebrew/downloads/2e8197b694f4165dd87a5553dc686d206188a939e12652c05ab515b1b3ab9a80--SoapyOsmo-soapy-osmo-0.2.5.tar.gz
==> Installing soapyosmo from pothosware/pothos
==> cmake ..
==> make install
Last 15 lines from ~/Library/Logs/Homebrew/soapyosmo/02.make:
[ 94%] Built target miriSupport
/opt/homebrew/Library/Homebrew/shims/mac/super/llvm_clang++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -bundle -Wl,-headerpad_max_install_names -o libosmosdrSupport.so "CMakeFiles/osmosdrSupport.dir/gr-osmosdr/lib/osmosdr/osmosdr_src_c.cc.o" CMakeFiles/osmosdrSupport.dir/register_osmosdr.cc.o CMakeFiles/osmosdrSupport.dir/Version.cpp.o  /opt/homebrew/lib/libosmosdr.dylib libSoapyOsmoSDR.0.2.4.dylib /opt/homebrew/lib/libboost_thread-mt.dylib /opt/homebrew/lib/libboost_system-mt.dylib /opt/homebrew/lib/libSoapySDR.0.8.1.dylib -pthread -flat_namespace
[ 94%] Built target osmosdrSupport
[100%] Linking CXX shared module librfspaceSupport.so
/opt/homebrew/Cellar/cmake/3.24.2/bin/cmake -E cmake_link_script CMakeFiles/rfspaceSupport.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/llvm_clang++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -bundle -Wl,-headerpad_max_install_names -o librfspaceSupport.so "CMakeFiles/rfspaceSupport.dir/gr-osmosdr/lib/rfspace/rfspace_source_c.cc.o" CMakeFiles/rfspaceSupport.dir/register_rfspace.cc.o CMakeFiles/rfspaceSupport.dir/Version.cpp.o  libSoapyOsmoSDR.0.2.4.dylib /opt/homebrew/lib/libboost_thread-mt.dylib /opt/homebrew/lib/libboost_system-mt.dylib /opt/homebrew/lib/libSoapySDR.0.8.1.dylib -pthread -flat_namespace
Undefined symbols for architecture arm64:
  "boost::chrono::steady_clock::now()", referenced from:
      void boost::this_thread::sleep_for<long long, boost::ratio<1l, 1000l> >(boost::chrono::duration<long long, boost::ratio<1l, 1000l> > const&) in rfspace_source_c.cc.o
      void boost::this_thread::sleep_for<long long, boost::ratio<1l, 1l> >(boost::chrono::duration<long long, boost::ratio<1l, 1l> > const&) in rfspace_source_c.cc.o
ld: symbol(s) not found for architecture arm64
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [librfspaceSupport.so] Error 1
make[1]: *** [CMakeFiles/rfspaceSupport.dir/all] Error 2
make: *** [all] Error 2

Any further advice or thoughts would be appreciated!

@tbitson
Copy link

tbitson commented Nov 11, 2022

Trying to build manually results in:

[ 0%] Building CXX object lib/CMakeFiles/Pothos.dir/System/NumaInfoOSX.cpp.o
[ 1%] Building CXX object lib/CMakeFiles/Pothos.dir/Framework/ThreadConfigUnix.cpp.o
[ 1%] Building CXX object lib/CMakeFiles/Pothos.dir/Init.cpp.o
[ 2%] Building CXX object lib/CMakeFiles/Pothos.dir/Testing.cpp.o
[ 3%] Building CXX object lib/CMakeFiles/Pothos.dir/Exception.cpp.o
[ 3%] Building CXX object lib/CMakeFiles/Pothos.dir/System/Logger.cpp.o
/Users/tbitson/Library/Caches/Homebrew/downloads/PothosCore-pothos-0.7.1/lib/System/Logger.cpp:140:35: error: no matching constructor for initialization of 'Poco::Net::DatagramSocket'
Poco::Net::DatagramSocket sock(Poco::Net::SocketAddress(addr, 0));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/Poco/Net/DatagramSocket.h:45:11: note: candidate constructor not viable: no known conversion from 'Poco::Net::SocketAddress' to 'SocketAddress::Family' (aka 'Poco::Net::AddressFamily::Family') for 1st argument
explicit DatagramSocket(SocketAddress::Family family);
^
/usr/local/include/Poco/Net/DatagramSocket.h:60:2: note: candidate constructor not viable: no known conversion from 'Poco::Net::SocketAddress' to 'const Poco::Net::Socket' for 1st argument
DatagramSocket(const Socket& socket);
^
/usr/local/include/Poco/Net/DatagramSocket.h:66:2: note: candidate constructor not viable: no known conversion from 'Poco::Net::SocketAddress' to 'const Poco::Net::DatagramSocket' for 1st argument
DatagramSocket(const DatagramSocket& socket);
^
/usr/local/include/Poco/Net/DatagramSocket.h:283:2: note: candidate constructor not viable: no known conversion from 'Poco::Net::SocketAddress' to 'Poco::Net::SocketImpl ' for 1st argument
DatagramSocket(SocketImpl
pImpl);
^
/usr/local/include/Poco/Net/DatagramSocket.h:35:2: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
DatagramSocket();
^
/usr/local/include/Poco/Net/DatagramSocket.h:51:2: note: candidate constructor not viable: requires at least 2 arguments, but 1 was provided
DatagramSocket(const SocketAddress& address, bool reuseAddress, bool reusePort = false, bool ipV6Only = false);
^
1 error generated.
make[2]: *** [lib/CMakeFiles/Pothos.dir/System/Logger.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/Pothos.dir/all] Error 2
make: *** [all] Error 2

@ncorgan ncorgan self-assigned this May 8, 2023
@ncorgan
Copy link
Member

ncorgan commented May 8, 2023

This has been fixed upstream and will reach packages in the next few weeks.

@1nikolas
Copy link

still having this issue..

@bobbyl140
Copy link

Issue does still exist, hoping for fix!

@bobbyl140
Copy link

@ncorgan Coming back to this but still can't figure it out. Any news on the fix?

@righthalfplane
Copy link
Author

Some where they said that they have dropped brew support for all versions of MacOS before Ventura.

@bobbyl140
Copy link

Maybe it’s worth a new issue then, because I’m on Sonoma and things aren’t working.

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

No branches or pull requests

6 participants