Open barracuda156 opened 10 months ago
Also fails on an old 10.6 with gcc, similarly on linking:
:info:build FAILED: quic/dsr/libmvfst_dsr_frontend.0.dylib
:info:build : && /opt/local/bin/g++-mp-13 -pipe -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include/LegacySupport -I/opt/local/libexec/boost/1.81/include -isystem/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -L/opt/local/libexec/boost/1.81/lib -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -o quic/dsr/libmvfst_dsr_frontend.0.dylib -install_name @rpath/libmvfst_dsr_frontend.0.dylib quic/dsr/CMakeFiles/mvfst_dsr_frontend.dir/frontend/Scheduler.cpp.o quic/dsr/CMakeFiles/mvfst_dsr_frontend.dir/frontend/WriteCodec.cpp.o quic/dsr/CMakeFiles/mvfst_dsr_frontend.dir/frontend/WriteFunctions.cpp.o -Wl,-rpath,/opt/local/lib quic/dsr/libmvfst_dsr_types.0.dylib quic/codec/libmvfst_codec_types.0.dylib quic/common/libmvfst_bufutil.0.dylib quic/libmvfst_constants.0.dylib quic/libmvfst_exception.0.dylib /opt/local/lib/libfizz.1.0.0.dylib /opt/local/lib/libfolly.0.58.0-dev.dylib /opt/local/lib/libfmt10/libfmt.10.2.1.dylib /opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_chrono-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_atomic-mt.dylib /opt/local/lib/libdouble-conversion.dylib /opt/local/lib/libglog.dylib /opt/local/lib/libevent.dylib /opt/local/lib/libz.dylib /opt/local/lib/libbz2.dylib /opt/local/lib/liblzma.dylib /opt/local/lib/liblz4.dylib /opt/local/lib/libsnappy.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libunwind.dylib /opt/local/lib/libgflags.2.2.2.dylib /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libzstd.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libz.dylib && :
:info:build Undefined symbols:
:info:build "__ZN4quic11getAckStateERNS_23QuicConnectionStateBaseENS_17PacketNumberSpaceE", referenced from:
:info:build __ZN4quic23DSRStreamFrameScheduler17enrichInstructionERNS_15SendInstruction7BuilderERKNS_15QuicStreamStateE in Scheduler.cpp.o
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build "__ZN4quic30congestionControlWritableBytesERNS_23QuicConnectionStateBaseE", referenced from:
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build "__ZN4quic17QuicStreamManager10findStreamEy", referenced from:
:info:build __ZN4quic23DSRStreamFrameScheduler27enrichAndAddSendInstructionEjNS0_16SchedulingResultERNS_20DSRPacketBuilderBaseERNS_15SendInstruction7BuilderERKNS_13PriorityQueueERKN9__gnu_cxx17__normal_iteratorIPKNS7_5LevelESt6vectorISC_SaISC_EEEERNS_15QuicStreamStateE in Scheduler.cpp.o
:info:build __ZN4quic23DSRStreamFrameScheduler11writeStreamERNS_20DSRPacketBuilderBaseE in Scheduler.cpp.o
:info:build "__ZN4quic16updateConnectionERNS_23QuicConnectionStateBaseEN5folly8OptionalINS_11PacketEventEEENS_22RegularQuicWritePacketENSt6chrono10time_pointINS7_3_V212steady_clockENS7_8durationIxSt5ratioILx1ELx1000000000EEEEEEjjb", referenced from:
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build "__ZN4quic18writeLoopTimeLimitENSt6chrono10time_pointINS0_3_V212steady_clockENS0_8durationIxSt5ratioILx1ELx1000000000EEEEEERKNS_23QuicConnectionStateBaseE", referenced from:
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build "__ZN4quic16getNextPacketNumERKNS_23QuicConnectionStateBaseENS_17PacketNumberSpaceE", referenced from:
:info:build __ZN4quic23DSRStreamFrameScheduler17enrichInstructionERNS_15SendInstruction7BuilderERKNS_15QuicStreamStateE in Scheduler.cpp.o
:info:build __ZN4quic25writePacketizationRequestERNS_25QuicServerConnectionStateERKNS_12ConnectionIdEmRKNS_4AeadENSt6chrono10time_pointINS8_3_V212steady_clockENS8_8durationIxSt5ratioILx1ELx1000000000EEEEEE in WriteFunctions.cpp.o
:info:build "__ZN4quic27getLargestDeliverableOffsetERKNS_15QuicStreamStateE", referenced from:
:info:build __ZN4quic23DSRStreamFrameScheduler17enrichInstructionERNS_15SendInstruction7BuilderERKNS_15QuicStreamStateE in Scheduler.cpp.o
:info:build "__ZN4quic33getSendStreamFlowControlBytesWireERKNS_15QuicStreamStateE", referenced from:
:info:build __ZN4quic23DSRStreamFrameScheduler11writeStreamERNS_20DSRPacketBuilderBaseE in Scheduler.cpp.o
:info:build "__ZN4quic31getSendConnFlowControlBytesWireERKNS_23QuicConnectionStateBaseE", referenced from:
:info:build __ZNK4quic23DSRStreamFrameScheduler14hasPendingDataEv in Scheduler.cpp.o
:info:build __ZN4quic23DSRStreamFrameScheduler11writeStreamERNS_20DSRPacketBuilderBaseE in Scheduler.cpp.o
:info:build ld: symbol(s) not found
:info:build collect2: error: ld returned 1 exit status
Also fails without Ninja:
:info:build [ 45%] Linking CXX shared library libmvfst_state_stream_functions.dylib
:info:build cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_mvfst/mvfst/work/mvfst-2024.01.08.00/quic/state && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/mvfst_state_stream_functions.dir/link.txt --verbose=ON
:info:build /opt/local/bin/g++-mp-13 -pipe -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include/LegacySupport -I/opt/local/libexec/boost/1.81/include -isystem/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -L/opt/local/libexec/boost/1.81/lib -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -o libmvfst_state_stream_functions.0.dylib -install_name @rpath/libmvfst_state_stream_functions.0.dylib CMakeFiles/mvfst_state_stream_functions.dir/QuicStreamFunctions.cpp.o -Wl,-rpath,/opt/local/lib libmvfst_state_machine.0.dylib ../codec/libmvfst_codec.0.dylib ../handshake/libmvfst_handshake.0.dylib ../codec/libmvfst_codec_packet_number_cipher.0.dylib ../codec/libmvfst_codec_decode.0.dylib ../codec/libmvfst_codec_types.0.dylib ../common/libmvfst_bufutil.0.dylib ../libmvfst_constants.0.dylib ../libmvfst_exception.0.dylib /opt/local/lib/libfizz.1.0.0.dylib /opt/local/lib/libfolly.0.58.0-dev.dylib /opt/local/lib/libfmt10/libfmt.10.2.1.dylib /opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_chrono-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_atomic-mt.dylib /opt/local/lib/libdouble-conversion.dylib /opt/local/lib/libglog.dylib /opt/local/lib/libevent.dylib /opt/local/lib/libz.dylib /opt/local/lib/libbz2.dylib /opt/local/lib/liblzma.dylib /opt/local/lib/liblz4.dylib /opt/local/lib/libsnappy.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libunwind.dylib /opt/local/lib/libgflags.2.2.2.dylib /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libzstd.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libz.dylib
:info:build [ 45%] Built target mvfst_happyeyeballs
:info:build Undefined symbols:
:info:build "__ZN4quic23updateFlowControlOnReadERNS_15QuicStreamStateEyNSt6chrono10time_pointINS2_3_V212steady_clockENS2_8durationIxSt5ratioILx1ELx1000000000EEEEEE", referenced from:
:info:build __ZN4quic25consumeDataFromQuicStreamERNS_15QuicStreamStateEy in QuicStreamFunctions.cpp.o
:info:build __ZN4quic22readDataFromQuicStreamERNS_15QuicStreamStateEy in QuicStreamFunctions.cpp.o
:info:build "__ZN4quic29updateFlowControlOnStreamDataERNS_15QuicStreamStateEyy", referenced from:
:info:build __ZN5folly6detail8function14FunctionTraitsIFvyyEE9callSmallIZN4quic22appendDataToReadBufferERNS6_15QuicStreamStateENS6_12StreamBufferEEUlyyE_EEvyyRNS1_4DataE in QuicStreamFunctions.cpp.o
:info:build "__ZN4quic28maybeWriteBlockAfterAPIWriteERNS_15QuicStreamStateE", referenced from:
:info:build __ZN4quic21writeDataToQuicStreamERNS_15QuicStreamStateESt10unique_ptrIN5folly5IOBufESt14default_deleteIS4_EEb in QuicStreamFunctions.cpp.o
:info:build __ZN4quic24writeBufMetaToQuicStreamERNS_15QuicStreamStateERKNS_10BufferMetaEb in QuicStreamFunctions.cpp.o
:info:build "__ZN4quic32updateFlowControlOnWriteToStreamERNS_15QuicStreamStateEy", referenced from:
:info:build __ZN4quic21writeDataToQuicStreamERNS_15QuicStreamStateESt10unique_ptrIN5folly5IOBufESt14default_deleteIS4_EEb in QuicStreamFunctions.cpp.o
:info:build __ZN4quic24writeBufMetaToQuicStreamERNS_15QuicStreamStateERKNS_10BufferMetaEb in QuicStreamFunctions.cpp.o
:info:build ld: symbol(s) not found
Thanks for reporting.
Could you please add some information on the build command you ran, for me to reproduce?
@lnicco Thank you for responding!
I could post a complete log tomorrow, but I believe, it should be reproducible from sudo port -v build mvfst
after turning the setting on here: https://github.com/macports/macports-ports/blob/f6597bf42bc44bf84cdd1ee64c9ff54135c59e15/devel/mvfst/Portfile#L58
(it can be just edited prior to the build).
(Presumably the identical result should be achieved if the same settings are passed manually (including those from cmake portgroup), though that may not be the case strictly always.)
If it is something on Macports side causing this, please let me know, I would want to fix it then. But the failure is not something typical, whether overall in Macports or specifically with folly
group of software. I had to turn dynamic libs off for proxygen
too, since it depends on mvfst
now, but aside of that, everything else builds and links fine with standard configs, and that has been the case for quite some time. (Older macOS may have non-standard issues, of course, but here the error was the same on 14.2.1.)
@lnicco Same error on Catalina x86_64: mvfst_catalina.log
And log from Sonoma aarch64: mvfst_sonoma.log
Thanks @barracuda156. I am able to reproduce the issue. It looks like the target_link_libraries for several of the mvfst libraries need updating in the CMakeLists files. Building the shared libraries has probably been broken for a while.
You are welcome to raise a PR to update them. Otherwise, we can work on fixing them soon.
As of v2024.06.03, the problem is still there:
FAILED: quic/state/libmvfst_state_stream_functions.0.dylib
: && /opt/local/bin/g++-mp-powerpc -pipe -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include/LegacySupport -I/opt/local/libexec/boost/1.81/include -isystem/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -L/opt/local/libexec/boost/1.81/lib -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -o quic/state/libmvfst_state_stream_functions.0.dylib -install_name @rpath/libmvfst_state_stream_functions.0.dylib quic/state/CMakeFiles/mvfst_state_stream_functions.dir/QuicStreamFunctions.cpp.o -Wl,-rpath,/opt/local/lib quic/state/libmvfst_state_machine.0.dylib quic/codec/libmvfst_codec.0.dylib quic/handshake/libmvfst_handshake.0.dylib quic/codec/libmvfst_codec_packet_number_cipher.0.dylib quic/codec/libmvfst_codec_decode.0.dylib quic/codec/libmvfst_codec_types.0.dylib quic/common/libmvfst_bufutil.0.dylib quic/libmvfst_constants.0.dylib quic/libmvfst_exception.0.dylib /opt/local/lib/libfizz.1.0.0.dylib /opt/local/lib/libfolly.0.58.0-dev.dylib /opt/local/lib/libfmt10/libfmt.10.2.1.dylib /opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_chrono-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_atomic-mt.dylib /opt/local/lib/libdouble-conversion.dylib /opt/local/lib/libglog.dylib /opt/local/lib/libevent.dylib /opt/local/lib/libz.dylib /opt/local/lib/libbz2.dylib /opt/local/lib/liblzma.dylib /opt/local/lib/liblz4.dylib /opt/local/lib/libsnappy.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libunwind.dylib /opt/local/lib/libgflags.2.2.2.dylib /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libzstd.dylib /opt/local/lib/libsodium.dylib /opt/local/lib/libz.dylib && :
Undefined symbols:
"__ZN4quic28maybeWriteBlockAfterAPIWriteERNS_15QuicStreamStateE", referenced from:
__ZN4quic21writeDataToQuicStreamERNS_15QuicStreamStateESt10unique_ptrIN5folly5IOBufESt14default_deleteIS4_EEb in QuicStreamFunctions.cpp.o
__ZN4quic24writeBufMetaToQuicStreamERNS_15QuicStreamStateERKNS_10BufferMetaEb in QuicStreamFunctions.cpp.o
"__ZN4quic32updateFlowControlOnWriteToStreamERNS_15QuicStreamStateEy", referenced from:
__ZN4quic21writeDataToQuicStreamERNS_15QuicStreamStateESt10unique_ptrIN5folly5IOBufESt14default_deleteIS4_EEb in QuicStreamFunctions.cpp.o
__ZN4quic24writeBufMetaToQuicStreamERNS_15QuicStreamStateERKNS_10BufferMetaEb in QuicStreamFunctions.cpp.o
"__ZN4quic23updateFlowControlOnReadERNS_15QuicStreamStateEyNSt6chrono10time_pointINS2_3_V212steady_clockENS2_8durationIxSt5ratioILx1ELx1000000000EEEEEE", referenced from:
__ZN4quic25consumeDataFromQuicStreamERNS_15QuicStreamStateEy in QuicStreamFunctions.cpp.o
__ZN4quic22readDataFromQuicStreamERNS_15QuicStreamStateEy in QuicStreamFunctions.cpp.o
"__ZN4quic29updateFlowControlOnStreamDataERNS_15QuicStreamStateEyy", referenced from:
__ZN5folly6detail8function5call_IZN4quic22appendDataToReadBufferERNS3_15QuicStreamStateENS3_12StreamBufferEEUlyyE_Lb1ELb0EvJyyEEET2_DpT3_RNS1_4DataE in QuicStreamFunctions.cpp.o
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
This is on 14.2.1 aarch64:
Something seems to be broken.