Closed ilovezfs closed 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Go away @stale[bot], this is most definitely still an issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Relax bot. Take another few weeks off.
Hello. I came across this issue from a failed attempt to install gst-plugins-bad
. Is there a place to better understand what this issue is and what it means for something to be "opportunistically linked". Would love to better understand why these builds are failing.
@ilovezfs I'd be happy to help with this, but can you possibly explain what the term "opportunistically linked" means? (Thank you!)
It means that one package (e.g. argyll-cms) ends up linked to the libraries of another package (e.g. libpng) even though there's no direct or recursive dependency of the former on the latter.
iMac-TMP:~ joe$ brew deps argyll-cms
jpeg
libtiff
iMac-TMP:~ joe$ brew install libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.34.el_capitan.bottle.tar.gz
Already downloaded: /Users/joe/Library/Caches/Homebrew/libpng-1.6.34.el_capitan.bottle.tar.gz
==> Pouring libpng-1.6.34.el_capitan.bottle.tar.gz
πΊ /usr/local/Cellar/libpng/1.6.34: 26 files, 1.2MB
iMac-TMP:~ joe$ brew install -s argyll-cms
==> Installing dependencies for argyll-cms: jam, jpeg, libtiff
==> Installing argyll-cms dependency: jam
==> Downloading https://homebrew.bintray.com/bottles/jam-2.6.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring jam-2.6.el_capitan.bottle.tar.gz
πΊ /usr/local/Cellar/jam/2.6: 4 files, 103.6KB
==> Installing argyll-cms dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-9b.el_capitan.bottle.tar.gz
Already downloaded: /Users/joe/Library/Caches/Homebrew/jpeg-9b.el_capitan.bottle.tar.gz
==> Pouring jpeg-9b.el_capitan.bottle.tar.gz
πΊ /usr/local/Cellar/jpeg/9b: 20 files, 725.1KB
==> Installing argyll-cms dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.9_1.el_capitan.bottle.tar.gz
Already downloaded: /Users/joe/Library/Caches/Homebrew/libtiff-4.0.9_1.el_capitan.bottle.tar.gz
==> Pouring libtiff-4.0.9_1.el_capitan.bottle.tar.gz
πΊ /usr/local/Cellar/libtiff/4.0.9_1: 246 files, 3.5MB
==> Installing argyll-cms
==> Downloading https://www.argyllcms.com/Argyll_V2.0.0_src.zip
######################################################################## 100.0%
==> sh makeall.sh
==> ./makeinstall.sh
πΊ /usr/local/Cellar/argyll-cms/2.0.0: 328 files, 115MB, built in 1 minute 3 seconds
iMac-TMP:~ joe$ brew linkage argyll-cms
System libraries:
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
/usr/lib/libSystem.B.dylib
/usr/lib/libobjc.A.dylib
Homebrew libraries:
/usr/local/opt/jpeg/lib/libjpeg.9.dylib (jpeg)
/usr/local/opt/libpng/lib/libpng16.16.dylib (libpng)
/usr/local/opt/libtiff/lib/libtiff.5.dylib (libtiff)
Undeclared dependencies with linkage:
libpng
iMac-TMP:~ joe$
Ah, I see β thatβs what I thought, but I wasnβt 100% sure. I have some ideas on how to fix these, will be making this my dayβs project. π
Usually it just needs an explicit --without-foo
passed to configure.
I'll be updating this comment as my own little to-do list, so that way everything can be kept track of! (Legend: π€ = not started, π« = no solution found, β = could not replicate, π = working on a solution, β = solution finished and in a PR.)
β
argyll-cms loads it's own version of libpng
if it cannot find a pre-installed version. However, this seems to be the case with all of its dependencies (jpeg, libtiff, and even zlib). Unfortunately, there's no way to specify --without-libpng
, which is the final piece of evidence that points towards it being required. #23381
π« fdroidserver also seems to be linking to little-cms2
.
β
fizmo actually requires freetype
, but when it can't find fontconfig
, it loads an old one bundled with X11. As @ilovezfs says, it's better to just require fontconfig
. #23383
β
fox has the same issue as fizmo
. #23382
β
freeswitch also seems to be linking to unixodbc
. Both it and postgresql
seem to be installing anyways, however. As such, I've decided to simply add these two as dependencies. (I didn't have the issue with xz
, possibly patched already?) #23384
β
gegl also seems to be linking to cairo
and jasper
. All of them have been added as optional dependencies, and will not link unless requested. #23437
:zzz: rlvm :zzz: volatility
:zzz: gst-plugins-bad (doesn't have --without-XXX
options)
:zzz: gst-plugins-ugly (doesn't have --without-XXX
options)
:zzz: jbig2enc (doesn't have --without-XXX
options)
:zzz: vice (doesn't have --without-XXX
options)
@vinyldarkscratch unfortunately the problem is primarily about preventing these from becoming corrupted during CI jobs that happen to involve the other formula, not about giving users an opt-out.
That's true -- I'm working on argyll-cms
(and learning about what a Jamfile is in the process) at the moment, but I'll get back to fox
and see if I can find a good solution for it?
Actually, I'd just require fontconfig because when our fontconfig isn't installed, it just tries to use the random old fontconfig that is bundled with X11.
@ilovezfs Ah, that's definitely a good reason -- PR incoming. :wink:
Ping: fizmo
and gegl
have been fixed; can be checked off.
gst-plugins-bad
picks up several formulae opportunistically, and I don't see configure
controls for them. That'll be a larger job to fix.
$ brew install -s gst-plugins-bad
...
$ brew linkage gst-plugins-bad
...
Undeclared dependencies with linkage:
cairo
faad2
glib
gstreamer
libpng
pango
Similar with gst-plugins-ugly
.
$ brew linkage gst-plugins-ugly
...
Undeclared dependencies with linkage:
glib
gstreamer
lame
I think we should ignore whatever doesn't have a --without-foo
Fair enough. I'll skip over those.
Remaining formulae:
gst-plugins-bad
: has no --without-LIB
option
gst-plugins-ugly
: has no --without-LIB
option
io
: cmake
jbig2enc
: has no --without-*
switches for its lib dependencies.
open-scene-graph
: cmake
podofo
: cmake
rlvm
: uses SCons; gonna have to research that.
vice
: has no --without-mpg123
option
volatility
: Python, has several linkages; postponing that one till I hear about fdroidserver
The CMake-based formulae require hacking the CMakelists file for each lib, the way open-scene-graph
does for ffmpeg
:
# Turning off FFMPEG takes this change or a dozen "-DFFMPEG_" variables
if build.without? "ffmpeg"
inreplace "CMakeLists.txt", "FIND_PACKAGE(FFmpeg)", "#FIND_PACKAGE(FFmpeg)"
end
Do you want fixes for those?
The CMake-based formulae require hacking the CMakelists file
These can almost always be addressed with a CMake arg.
You're right. -DCMAKE_DISABLE_FIND_PACKAGE_<packagename>
does it; it was just a bit hard to find that in docs. Added PRs for io
and open-scene-graph
.
Usually you can run cmake -LAH
or cmake -LAH ..
just after the cmake step in a formula to get a dump of most of the available variables, including undocumented ones.
Closing as @ilovezfs isn't around to maintain the list any more.
During the jpeg 9 PR, these formulae ended up opportunistically linked:
(The pull requests indicate a fix, and the commits indicate just that a new bottle was pulled as a workaround.)