Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#67230 closed defect (invalid)

curl @8.0.1_0+http2+ssl has issues with incompatibilities

Reported by: Gandoon (Erik Hedlund) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: curl

Description

I am not sure exactly when this started, but recently is likely. No logs are available as the port installs as expected.

I have tried to rebuild the port (port -v -n upgrade --force curl), and the mentioned libcurl.4.dylib was indeed rebuilt. The error is still, as before:

dyld: Library not loaded: /opt/local/lib/libcurl.4.dylib
  Referenced from: /opt/local/bin/curl
  Reason: Incompatible library version: curl requires version 13.0.0 or later, but libcurl.4.dylib provides version 10.0.0

I noticed the problem because git does use curl and it failed.

Is there anything I may have missed here?

Attachments (1)

curl-main.log (943.1 KB) - added by Gandoon (Erik Hedlund) 13 months ago.
curl @8.0.1_0 +http2 +ssl build log.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: libcurl removed
Owner: set to ryandesign
Port: curl added
Status: newassigned

On my macOS 12 x86_64 system, libcurl.dylib is version 13.0.0:

% otool -L /opt/local/lib/libcurl.dylib
/opt/local/lib/libcurl.dylib:
	/opt/local/lib/libcurl.4.dylib (compatibility version 13.0.0, current version 13.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1856.105.0)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.60.3)
	/opt/local/lib/libnghttp2.14.dylib (compatibility version 39.0.0, current version 39.1.0)
	/opt/local/lib/libidn2.0.dylib (compatibility version 4.0.0, current version 4.8.0)
	/opt/local/lib/libpsl.5.dylib (compatibility version 9.0.0, current version 9.4.0)
	/opt/local/libexec/openssl3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/local/libexec/openssl3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/local/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.4)
	/opt/local/lib/libbrotlidec.1.dylib (compatibility version 1.0.0, current version 1.0.9)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.13)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)

Can you provide more information about your system? OS version, processor? Can you show a terminal transcript of running sudo port -nk upgrade --force curl so that we can see whether a binary is used or it is built from source? Adding -k will cause the main.log file and work directory to be kept even after a successful install; you could then attach it. (Its location is printed by port logfile curl.) After attaching it, you can sudo port clean curl to delete the log and work directory.

comment:2 in reply to:  1 Changed 13 months ago by Gandoon (Erik Hedlund)

Replying to ryandesign:

On my macOS 12 x86_64 system, libcurl.dylib is version 13.0.0:

… Snipp …

Can you provide more information about your system? OS version, processor? Can you show a terminal transcript of running sudo port -nk upgrade --force curl so that we can see whether a binary is used or it is built from source? Adding -k will cause the main.log file and work directory to be kept even after a successful install; you could then attach it. (Its location is printed by port logfile curl.) After attaching it, you can sudo port clean curl to delete the log and work directory.

Of course, I am using an Intel i7 system with MacOS 10.15 (certain software compatibility reasons). The equivalent otool output for my system is:

€ otool -L /opt/local/lib/libcurl.dylib
/opt/local/lib/libcurl.dylib:
	/opt/local/lib/libcurl.4.dylib (compatibility version 13.0.0, current version 13.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1061.141.1)
	/opt/local/lib/libnghttp2.14.dylib (compatibility version 39.0.0, current version 39.1.0)
	/opt/local/lib/libidn2.0.dylib (compatibility version 4.0.0, current version 4.8.0)
	/opt/local/lib/libpsl.5.dylib (compatibility version 9.0.0, current version 9.4.0)
	/opt/local/libexec/openssl3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/local/libexec/openssl3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/opt/local/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.5)
	/opt/local/lib/libbrotlidec.1.dylib (compatibility version 1.0.0, current version 1.0.9)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.13)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

Which seems to mirror your output with a reported version 13.0.0.

I have configured macports to always build from source, so that shouldn't be a problem. But I did rebuild it once more with the following output:

€ sudo port -nk upgrade --force curl
--->  Computing dependencies for curl
--->  Fetching distfiles for curl
--->  Verifying checksums for curl
--->  Extracting curl
--->  Applying patches to curl
--->  Configuring curl
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  getpass_r: found in curl-8.0.1/config.log
  memrchr: found in curl-8.0.1/config.log
  CloseSocket: found in curl-8.0.1/config.log
  closesocket: found in curl-8.0.1/config.log
--->  Building curl
--->  Staging curl into destroot
--->  Unable to uninstall curl @8.0.1_0+http2+ssl, the following ports depend on it:
--->  	alienarena @7.71.1-20200830-r5669_1
--->  	transmission @3.00_1
--->  	proj7 @7.2.1_1+lto+native+tiff
--->  	libgit2 @1.5.2_0+threadsafe
--->  	gimp2 @2.10.34_0+python27+quartz
--->  	octave @8.1.0_0+app+clang14+fltk+gfortran+graphicsmagick+java+openblas+qt5+sound+sundials
--->  	cabal @3.10.1.0_0
--->  	cmake @3.24.4_0+docs+python311+qt5
--->  	netcdf @4.9.2_0+cdf5+clang15+dap+netcdf4
--->  	rust @1.68.2_0
--->  	cargo @0.69.1_0
--->  	poppler @23.04.0_0+boost
--->  	gmic-lib @3.2.3_0+x11
--->  	gmic-gimp @3.2.3_0
--->  	gmic @3.2.3_0+opencv4+x11
--->  	git @2.40.0_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34+python+svn
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating curl @8.0.1_0+http2+ssl
--->  Cleaning curl
--->  Uninstalling curl @8.0.1_0+http2+ssl
--->  Cleaning curl
--->  Computing dependencies for curl
--->  Installing curl @8.0.1_0+http2+ssl
--->  Activating curl @8.0.1_0+http2+ssl
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

The error is still present, with the same otool output and I confirmed that the /opt/local/lib/libcurl.4.dylib has indeed been refreshed. I have also tried a force-rebuild of git that failed for me earlier but to no avail. Even curl itself spits out the error so I think I can rule out that it is a git-thing.

Last edited 13 months ago by Gandoon (Erik Hedlund) (previous) (diff)

Changed 13 months ago by Gandoon (Erik Hedlund)

Attachment: curl-main.log added

curl @8.0.1_0 +http2 +ssl build log.

comment:3 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

The error message seems to be lying... it says your /opt/local/lib/libcurl.4.dylib provides version 10.0.0 but you've shown with otool -L that it actually provides version 13.0.0 as it should.

Do you have the DYLD_LIBRARY_PATH environment variable set? If so, unset it.

Do you have another libcurl installed somewhere, such as in /usr/local/lib? If so, maybe it is interfering.

comment:4 in reply to:  3 Changed 13 months ago by Gandoon (Erik Hedlund)

Replying to ryandesign:

The error message seems to be lying... it says your /opt/local/lib/libcurl.4.dylib provides version 10.0.0 but you've shown with otool -L that it actually provides version 13.0.0 as it should.

Do you have the DYLD_LIBRARY_PATH environment variable set? If so, unset it.

Do you have another libcurl installed somewhere, such as in /usr/local/lib? If so, maybe it is interfering.

Aha, thank you very much.

MATLAB once again causing problems. It requires a DYLD_LIBRARY_PATH and in one of those paths it duplicates a whole bunch of software. Removing the corresponding path from the environment solved the problem. So you were right, curl tried to use the MATLAB provided libcurl, which is 4-5 years old. That is not the way I want it to work.

€ otool -L /Applications/MATLAB/MATLAB_Runtime/v94/bin/maci64/libcurl.dylib
/Applications/MATLAB/MATLAB_Runtime/v94/bin/maci64/libcurl.dylib:
	@rpath/libcurl.4.dylib (compatibility version 10.0.0, current version 10.0.0)
	@rpath/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	@rpath/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

Thank you, never thought about the DYLD_LIBRARY_PATH was set because of that MATLAB runtime installation. I will make sure I have a workaround for this.

comment:5 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: assignedclosed

I'm glad that was it because I wasn't sure what else to suggest!

I filed a bug report with MathWorks about MATLAB. They shouldn't be requiring you to set DYLD_LIBRARY_PATH since that causes problems like the one you observed.

comment:6 in reply to:  5 Changed 13 months ago by Gandoon (Erik Hedlund)

Replying to ryandesign:

I'm glad that was it because I wasn't sure what else to suggest!

I filed a bug report with MathWorks about MATLAB. They shouldn't be requiring you to set DYLD_LIBRARY_PATH since that causes problems like the one you observed.

Great, thank you. I was about to do it myself. Your input was invaluable, as I was stuck at looking for an answer that involved the problem being caused by some recent update from MacPorts that was detrimental to legacy system users.

Cheers :)

Note: See TracTickets for help on using tickets.