-
Notifications
You must be signed in to change notification settings - Fork 74
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
move complex ldconfig code into dependency build time #277
Conversation
src/dependencies.jl
Outdated
end | ||
end | ||
else | ||
let fmt = Regex("^\\s:-l(\\S+)\\.\\S+\\s(.+)\$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vtjnash ,
FreeBSD has this pattern
fmt = r"^\s+\d+:-l(\S+)\.\S+ => (.+)$"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some samples:
└─[iblis@abeing]% ldconfig -r | head
/var/run/ld-elf.so.hints:
search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/fcitx/qt:/usr/local/lib/gcc5:/usr/local/lib/gcc6:/usr/local/lib/graphviz:/usr/local/lib/mysql:/usr/local/lib/nss:/usr/local/lib/opencollada:/usr/local/lib/perl5/5.24/mach/CORE:/usr/local/lib/qt4:/usr/local/lib/samba4:/usr/local/lib/wine:/usr/local/llvm36/lib:/usr/local/llvm37/lib:/usr/local/llvm38/lib:/usr/local/llvm39/lib:/usr/local/mpi/openmpi/lib:/usr/local/mpi/openmpi/lib/openmpi:/usr/local/pypy-5.6/bin
0:-lalias.7 => /lib/libalias.so.7
1:-lncursesw.8 => /lib/libncursesw.so.8
2:-lavl.2 => /lib/libavl.so.2
3:-lbegemot.4 => /lib/libbegemot.so.4
4:-lbsdxml.4 => /lib/libbsdxml.so.4
5:-lc.7 => /lib/libc.so.7
6:-lcam.6 => /lib/libcam.so.6
7:-lcrypt.5 => /lib/libcrypt.so.5
julia> f = r"^\s+\d+:-l(\S+)\.\S+ => (.+)$"
r"^\s+\d+:-l(\S+)\.\S+ => (.+)$"
julia> line = " 0:-lalias.7 => /lib/libalias.so.7"
" 0:-lalias.7 => /lib/libalias.so.7"
julia> match(f, line)
RegexMatch(" 0:-lalias.7 => /lib/libalias.so.7", 1="alias", 2="/lib/libalias.so.7")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it distinguish between something like libLLVM-3.8.so.1
(with digits in the name) and libperl.so.5.22
(with multiple digits in the version number)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked - FreeBSD states that it must have exactly one digit following the dot. Thanks for checking up on this! :)
Codecov Report
@@ Coverage Diff @@
## master #277 +/- ##
===========================================
+ Coverage 0.14% 36.32% +36.17%
===========================================
Files 4 4
Lines 683 870 +187
===========================================
+ Hits 1 316 +315
+ Misses 682 554 -128
Continue to review full report at Codecov.
|
bump. |
How widely have you tested this? |
Ubuntu and FreeBSD. It doesn't have any meaning on Mac OS or Windows. It's also much more extensible than the current code (which is hard coded in C in base, and sometimes fails in our CI tests - although we just hide the error), so it will be much easier to add support for new OS configurations we discover later. |
I meant how many packages. |
src/dependencies.jl
Outdated
let ldconfig_arch = Dict(:i686 => "x32", | ||
:x86_64 => "x86-64", | ||
:aarch64 => "AArch64"), | ||
arch = get(ldconfig_arch, Sys.ARCH, ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sys.ARCH can end up as i586, possibly i386 or i486 on some distro builds
Ah, thanks. I thought we normalized all of those, but checking our Make.inc file, I see that we don't. |
bump? |
this is in preparation for base Julia to drop this function
Did you test this against any packages? |
I repeat, how many packages did you test this against? |
Can you give a specific example where the old code does the wrong thing? |
This is causing problems downstream, see JuliaStats/Rmath.jl#38 |
Without an actual counterexample, I see zero advantage whatsoever to using this version of the code on versions of julia prior to JuliaLang/julia#22886 |
Sure. Can you fix the METADATA version bound to require |
That fix isn't in every You also haven't provided a concrete test case where the old code did the wrong thing, so I'm not convinced this version is ever preferable. |
use the code path from before #277 on versions of julia where the new code freezes ref JuliaStats/Rmath.jl#38
use the code path from before #277 on versions of julia where the new code freezes ref JuliaStats/Rmath.jl#38
use the code path from before #277 on versions of julia where the new code freezes ref JuliaStats/Rmath.jl#38
this is in preparation for base Julia to drop this function