Skip to content
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

sqlite: do not contaminate dependent libtool-based projects with sqlite dependencies #41211

Merged
merged 2 commits into from May 29, 2018

Conversation

orivej
Copy link
Contributor

@orivej orivej commented May 29, 2018

Motivation for this change

sqlite is built as a shared library, but libtool nevertheless adds -lz into the
link commands of the dependent projects, which fail to link if they do not
directly depend on libz. Fix this by clearing dependency_libs in libsqlite3.la.

sqlite was made dependent on libz in #40626 and reached master in b22cc53. It seems better to merge this PR into master to stabilize it and prevent such workarounds as e89414f.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

…te dependencies

sqlite is built as a shared library, but libtool nevertheless adds -lz into the
link commands of the dependent projects, which fail to link if they do not
directly depend on libz.  Fix this by clearing dependency_libs in libsqlite3.la.
This reverts commit e89414f.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

checking for references to /build in /nix/store/d07xbarzhj87gny9l96msszgm78k23pp-sqlite-3.23.1-dev...
separating debug info from /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1/lib/libsqlite3.so.0.8.6 (build ID 9ae92ddc4c0249f2e684f2600be29d354d324ceb)
shrinking RPATHs of ELF executables and libraries in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1
shrinking /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1/lib/libsqlite3.so.0.8.6
patching script interpreter paths in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1
checking for references to /build in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1...
shrinking RPATHs of ELF executables and libraries in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug
patching script interpreter paths in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug
checking for references to /build in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug...
/nix/store/7aczjy7h4j076d3iv5i7gzwwp3z2xxm4-sqlite-3.23.1-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

checking for references to /build in /nix/store/d07xbarzhj87gny9l96msszgm78k23pp-sqlite-3.23.1-dev...
separating debug info from /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1/lib/libsqlite3.so.0.8.6 (build ID 9ae92ddc4c0249f2e684f2600be29d354d324ceb)
shrinking RPATHs of ELF executables and libraries in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1
shrinking /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1/lib/libsqlite3.so.0.8.6
patching script interpreter paths in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1
checking for references to /build in /nix/store/5ikcl119y2zh4kcms34r68wzr2mr43qr-sqlite-3.23.1...
shrinking RPATHs of ELF executables and libraries in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug
patching script interpreter paths in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug
checking for references to /build in /nix/store/dn1fyrj03qxz0mzbdfdyavk9adzwmvnc-sqlite-3.23.1-debug...
/nix/store/7aczjy7h4j076d3iv5i7gzwwp3z2xxm4-sqlite-3.23.1-bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

checking for references to /build in /nix/store/a1lnf7wwpa1i464adzkvw4gfsamh6wdd-sqlite-3.23.1-dev...
separating debug info from /nix/store/n7mq8y2zafbn9drs0zbk19ws7kzl1wyq-sqlite-3.23.1/lib/libsqlite3.so.0.8.6 (build ID bf8c7a907aa9579872f98a037b67ff173bd093a0)
shrinking RPATHs of ELF executables and libraries in /nix/store/n7mq8y2zafbn9drs0zbk19ws7kzl1wyq-sqlite-3.23.1
shrinking /nix/store/n7mq8y2zafbn9drs0zbk19ws7kzl1wyq-sqlite-3.23.1/lib/libsqlite3.so.0.8.6
patching script interpreter paths in /nix/store/n7mq8y2zafbn9drs0zbk19ws7kzl1wyq-sqlite-3.23.1
checking for references to /build in /nix/store/n7mq8y2zafbn9drs0zbk19ws7kzl1wyq-sqlite-3.23.1...
shrinking RPATHs of ELF executables and libraries in /nix/store/aii7cd7gy72g9pql8y004mcfz2xqlk36-sqlite-3.23.1-debug
patching script interpreter paths in /nix/store/aii7cd7gy72g9pql8y004mcfz2xqlk36-sqlite-3.23.1-debug
checking for references to /build in /nix/store/aii7cd7gy72g9pql8y004mcfz2xqlk36-sqlite-3.23.1-debug...
/nix/store/8ivdv3j6kfjy3ql9aw9fpbmg88v3z36l-sqlite-3.23.1-bin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

these derivations will be built:
  /nix/store/av3xx9k7lr8ipj9abz43046siy2m1843-sqlite-3.23.1.drv
waiting for locks or build slots...
/nix/store/8ivdv3j6kfjy3ql9aw9fpbmg88v3z36l-sqlite-3.23.1-bin

@FRidh
Copy link
Member

FRidh commented May 29, 2018

Can this wait until we have a "more" stable master and staging again?

@orivej orivej changed the base branch from master to staging May 29, 2018 15:30
@orivej orivej merged commit 5197a4c into NixOS:staging May 29, 2018
@orivej
Copy link
Contributor Author

orivej commented May 29, 2018

OK, merged to staging.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

/nix/store/8ivdv3j6kfjy3ql9aw9fpbmg88v3z36l-sqlite-3.23.1-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: sqlite

Partial log (click to expand)

/nix/store/7aczjy7h4j076d3iv5i7gzwwp3z2xxm4-sqlite-3.23.1-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: sqlite

Partial log (click to expand)

cannot build derivation '/nix/store/4b0w599fcdckb4z1gxdm3myrbj64gr2h-hook.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/2csimkv5zxcw7ml2ibdfy7xxiz3iqrix-ICU-osx-10.10.5.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/0carlg1mxy8hpzb5fndn5b3xk4lpmf7r-cctools-binutils-darwin.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/inhzm6bg71kvxw6qh3myc0izwqlnavn2-gnutar-1.30.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/fk42yd4ya958lizr397cdg0s6r5bs6h8-CF-osx-10.10.5.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/zzg32lq1875glx8v4n504c9vgap3lnf4-cctools-binutils-darwin-wrapper.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/xif36r5y592vi1mjjscrzcqq569aamz4-clang-wrapper-5.0.2.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/p4rr4h4l44rdvcqbyyc82gh8h71a4clf-stdenv-darwin.drv': 35 dependencies couldn't be built
cannot build derivation '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv': 3 dependencies couldn't be built
error: build of '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: sqlite

Partial log (click to expand)

cannot build derivation '/nix/store/4b0w599fcdckb4z1gxdm3myrbj64gr2h-hook.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/2csimkv5zxcw7ml2ibdfy7xxiz3iqrix-ICU-osx-10.10.5.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/0carlg1mxy8hpzb5fndn5b3xk4lpmf7r-cctools-binutils-darwin.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/inhzm6bg71kvxw6qh3myc0izwqlnavn2-gnutar-1.30.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/fk42yd4ya958lizr397cdg0s6r5bs6h8-CF-osx-10.10.5.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/zzg32lq1875glx8v4n504c9vgap3lnf4-cctools-binutils-darwin-wrapper.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/xif36r5y592vi1mjjscrzcqq569aamz4-clang-wrapper-5.0.2.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/p4rr4h4l44rdvcqbyyc82gh8h71a4clf-stdenv-darwin.drv': 35 dependencies couldn't be built
cannot build derivation '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv': 3 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: sqlite

Partial log (click to expand)

cannot build derivation '/nix/store/4b0w599fcdckb4z1gxdm3myrbj64gr2h-hook.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/2csimkv5zxcw7ml2ibdfy7xxiz3iqrix-ICU-osx-10.10.5.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/0carlg1mxy8hpzb5fndn5b3xk4lpmf7r-cctools-binutils-darwin.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/inhzm6bg71kvxw6qh3myc0izwqlnavn2-gnutar-1.30.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/fk42yd4ya958lizr397cdg0s6r5bs6h8-CF-osx-10.10.5.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/zzg32lq1875glx8v4n504c9vgap3lnf4-cctools-binutils-darwin-wrapper.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/xif36r5y592vi1mjjscrzcqq569aamz4-clang-wrapper-5.0.2.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/p4rr4h4l44rdvcqbyyc82gh8h71a4clf-stdenv-darwin.drv': 35 dependencies couldn't be built
cannot build derivation '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv': 3 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/348r20mqxhx32l39dw1qhdsbazay6yzh-sqlite-3.23.1.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants