Comments (7)
@NickCao would you be able to give #55624 a try?
from julia.
LDFLAGS
is required for the linker to find bundled libraries
Line 728 in 378f192
Why do you claim setting LDFLAGS
is necessary? Autotools should be able to find libraries in the prefix, no? That's what we do with BinaryBuilder (which also uses a non-standard prefix where to install the packages) and we never have to set LDFLAGS
separately to point the linker to the prefix. And we already set the prefix in
Line 7 in 378f192
from julia.
Why do you claim setting
LDFLAGS
is necessary? Autotools should be able to find libraries in the prefix, no?
I believe the --prefix
option is only about the installation prefix of the package currently being configured (libunwind
)? It's not passed to the underlying compiler/linker by autotools, so the linker would still follow its default search paths.
from julia.
I'm not sure: in BinaryBuilder we don't have the prefix's libdir (/workspace/destdir/lib
) anywhere in the default search path of the compiler (see LIBRARY_PATH
):
sandbox:${WORKSPACE} # SUPER_VERBOSE=1 gcc -v
/opt/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc -D_GLIBCXX_USE_CXX11_ABI=1 -frandom-seed=0x75262c83 -L/opt/x86_64-linux-gnu/x86_64-linux-gnu/lib64 -Wl,-rpath-link,/opt/x86_64-linux-gnu/x86_64-linux-gnu/lib64 -march=x86-64 -mtune=generic -v
Using built-in specs.
COLLECT_GCC=/opt/x86_64-linux-gnu/bin/x86_64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/opt/x86_64-linux-gnu/bin/../libexec/gcc/x86_64-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: /workspace/srcdir/gcc-5.2.0/configure --prefix=/workspace/destdir --target=x86_64-linux-gnu --host=x86_64-linux-musl --build=x86_64-linux-musl --disable-multilib --disable-werror --enable-shared --enable-host-shared --enable-threads=posix --with-sysroot=/workspace/destdir/x86_64-linux-gnu/sys-root --program-prefix=x86_64-linux-gnu- --disable-bootstrap --with-arch=x86-64 --enable-languages=c,c++,fortran,objc,obj-c++
Thread model: posix
gcc version 5.2.0 (GCC)
COMPILER_PATH=/opt/x86_64-linux-gnu/bin/../libexec/gcc/x86_64-linux-gnu/5.2.0/:/opt/x86_64-linux-gnu/bin/../libexec/gcc/:/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/bin/
LIBRARY_PATH=/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/:/opt/x86_64-linux-gnu/bin/../lib/gcc/:/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/lib/../lib64/:/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/lib/../lib64/:/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64/:/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/lib/:/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/lib/:/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-D' '_GLIBCXX_USE_CXX11_ABI=1' '-frandom-seed=0x75262c83' '-L/opt/x86_64-linux-gnu/x86_64-linux-gnu/lib64' '-march=x86-64' '-mtune=generic' '-v'
/opt/x86_64-linux-gnu/bin/../libexec/gcc/x86_64-linux-gnu/5.2.0/collect2 -plugin /opt/x86_64-linux-gnu/bin/../libexec/gcc/x86_64-linux-gnu/5.2.0/liblto_plugin.so -plugin-opt=/opt/x86_64-linux-gnu/bin/../libexec/gcc/x86_64-linux-gnu/5.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cchfGdiM.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64/crt1.o /opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64/crti.o /opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/crtbegin.o -L/opt/x86_64-linux-gnu/x86_64-linux-gnu/lib64 -L/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0 -L/opt/x86_64-linux-gnu/bin/../lib/gcc -L/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/lib/../lib64 -L/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/lib/../lib64 -L/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64 -L/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/lib -L/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/lib -L/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib -rpath-link /opt/x86_64-linux-gnu/x86_64-linux-gnu/lib64 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/crtend.o /opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64/crtn.o
/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/lib/../lib64/crt1.o: In function `_start':
/workspace/srcdir/glibc-2.17/csu/../sysdeps/x86_64/start.S:119: undefined reference to `main'
collect2: error: ld returned 1 exit status
and yet we can find all the dependencies of libunwind just by setting the prefix (which I believe is used to look for the dependencies as well): https://github.com/JuliaPackaging/Yggdrasil/blob/84c1061962644addde53ef51f2ada406be61978b/L/LibUnwind/LibUnwind%401.8.1/build_tarballs.jl. LDFLAGS
isn't set anywhere
from julia.
That's since libunwind mostly only depends on zlib, which is available on nearly every system.
from julia.
That's since libunwind mostly only depends on zlib, which is available on nearly every system.
Not in the binarybuilder environment (which is why I'm insisting on taking it as an example).
from julia.
That's since libunwind mostly only depends on zlib, which is available on nearly every system.
Not in the binarybuilder environment (which is why I'm insisting on taking it as an example).
Except there is, tested with:
--- a/L/LibUnwind/[email protected]/build_tarballs.jl
+++ b/L/LibUnwind/[email protected]/build_tarballs.jl
@@ -29,6 +29,14 @@ if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
+cat > test.c <<EOF
+int main() {}
+EOF
+
+$CC -Wl,--verbose test.c -lz
+
+exit 1
+
export CFLAGS="-DPI -fPIC"
./configure \
--prefix=${prefix} \
attempt to open /opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/local/lib/libz.so succeeded
-lz (/opt/x86_64-linux-gnu/bin/../x86_64-linux-gnu/sys-root/usr/local/lib/libz.so
from julia.
Related Issues (20)
- Names of startup packages that are being precompiled are not being printed anymore HOT 1
- is `//` required to return `Rational`? Alternatively, an interface for rationals HOT 2
- Structured broadcasting doesn't work with functions that may not preserve structure conditionally HOT 1
- PROBLEM: Function `deepcopy()` doesn't Guarantee the Key Order of a Dictionary HOT 3
- Installing julia within windows for all users fails with error 5 "no access" HOT 2
- Wrong solution for inequalities in 'Dates.AbstractTime' format when at least one of the parameters is given as 'Dates.CompoundPeriod' type. HOT 1
- flaky test in filewatching stdlib? HOT 1
- `prod(())` shouldn't return `1` HOT 8
- `Base.:+(a::Int, b::Int) = -1` causes crash HOT 2
- macro hygiene: Module name does not like being renamed HOT 1
- Consider allowing local imports
- Cannot build julia on ubuntu arm VM on macOS M2 via Parallels HOT 4
- uncompressing method source results in corrupted debuginfo HOT 2
- tuples of symbols don't get vectorized HOT 1
- Broadcasting not type stable (but list comprehensions & map are) HOT 3
- read(stdin, Char) behaves differently in REPL vs when run as a script in VSCode HOT 1
- `numerator` and `denominator` should be defined for `Complex{<:Rational}` and for `Complex{<:Integer}` HOT 3
- How to drill into this crash HOT 6
- `size(_, dims=i)` would be more consistent than `size(_, i)`
- Support `sort(::Vector; dims=1)` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia.