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

don't set SQLITE3_LIB_DIR in FreeBSD images #549

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Conversation

tesaguri
Copy link
Contributor

@tesaguri tesaguri commented Apr 8, 2021

The environment variable has broken procedural macro crates which depend on libsqlite3-sys, such as migrations_macros.

Even without the variable, libsqlite3-sys finds the correct path anyway.

This fixes #520, as shown in the CI at tesaguri/cross-freebsd-diesel_migrations-test repository.

Additionally, this PR updates freebsd{,-extras}.sh to use OpenSSL from the base system, because the URLs https://pkg.freebsd.org/FreeBSD:12:{amd64,i686}/quarterly/All/openssl-1.1.1j,1.txz returns 404 now.

reitermarkus
reitermarkus previously approved these changes Aug 29, 2021
@reitermarkus
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Aug 29, 2021
505: Make the `USER` variable to `docker` optional r=reitermarkus a=eZanmoto

Populating this variable fails under Linux if the local user doesn't have a username. This may happen when using Docker and mapping a user ID from the host into a container, such as when using `--user=$(id -u):$(id -g)`. I suggest making the `USER` environment variable passed to `docker` optional, which allows `cross` to work in the given scenario.

511: FreeBSD: add libssp r=reitermarkus a=junhochoi

This is required to build some native projects
which is build with -fstack-protector when linked.

Also update sqlite3 version (quarterly is updated)

549: don't set `SQLITE3_LIB_DIR` in FreeBSD images r=reitermarkus a=tesaguri

The environment variable has broken procedural macro crates which depend on `libsqlite3-sys`, such as `migrations_macros`.

Even without the variable, `libsqlite3-sys` finds the correct path anyway.

This fixes #520, as shown in the CI at [tesaguri/cross-freebsd-diesel_migrations-test] repository.

Additionally, this PR updates `freebsd{,-extras}.sh` to use OpenSSL from the base system, because the URLs `https://pkg.freebsd.org/FreeBSD:12:{amd64,i686}/quarterly/All/openssl-1.1.1j,1.txz` returns `404` now.

[tesaguri/cross-freebsd-diesel_migrations-test]: https://github.com/tesaguri/cross-freebsd-diesel_migrations-test

Co-authored-by: Sean Kelleher <ezanmoto@gmail.com>
Co-authored-by: Junho Choi <junho.choi@gmail.com>
Co-authored-by: Markus Reiter <me@reitermark.us>
Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 29, 2021

Build failed (retrying...):

bors bot added a commit that referenced this pull request Aug 29, 2021
511: FreeBSD: add libssp r=reitermarkus a=junhochoi

This is required to build some native projects
which is build with -fstack-protector when linked.

Also update sqlite3 version (quarterly is updated)

549: don't set `SQLITE3_LIB_DIR` in FreeBSD images r=reitermarkus a=tesaguri

The environment variable has broken procedural macro crates which depend on `libsqlite3-sys`, such as `migrations_macros`.

Even without the variable, `libsqlite3-sys` finds the correct path anyway.

This fixes #520, as shown in the CI at [tesaguri/cross-freebsd-diesel_migrations-test] repository.

Additionally, this PR updates `freebsd{,-extras}.sh` to use OpenSSL from the base system, because the URLs `https://pkg.freebsd.org/FreeBSD:12:{amd64,i686}/quarterly/All/openssl-1.1.1j,1.txz` returns `404` now.

[tesaguri/cross-freebsd-diesel_migrations-test]: https://github.com/tesaguri/cross-freebsd-diesel_migrations-test

Co-authored-by: Junho Choi <junho.choi@gmail.com>
Co-authored-by: Markus Reiter <me@reitermark.us>
Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 29, 2021

Build failed (retrying...):

bors bot added a commit that referenced this pull request Aug 29, 2021
549: don't set `SQLITE3_LIB_DIR` in FreeBSD images r=reitermarkus a=tesaguri

The environment variable has broken procedural macro crates which depend on `libsqlite3-sys`, such as `migrations_macros`.

Even without the variable, `libsqlite3-sys` finds the correct path anyway.

This fixes #520, as shown in the CI at [tesaguri/cross-freebsd-diesel_migrations-test] repository.

Additionally, this PR updates `freebsd{,-extras}.sh` to use OpenSSL from the base system, because the URLs `https://pkg.freebsd.org/FreeBSD:12:{amd64,i686}/quarterly/All/openssl-1.1.1j,1.txz` returns `404` now.

[tesaguri/cross-freebsd-diesel_migrations-test]: https://github.com/tesaguri/cross-freebsd-diesel_migrations-test

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 29, 2021

Build failed:

  • rust-embedded.cross

@tesaguri
Copy link
Contributor Author

tesaguri commented Oct 3, 2021

Rebased onto master and removed commit 9a2b65c since it somehow caused curl to fail at certificate verification and the commit seems to be no longer necessary anyway.

Still, test on x86_64-pc-windows-msvc is failing:

https://dev.azure.com/rust-embedded/cross/_build/results?buildId=945&view=logs&j=a3d15252-dc4a-56ed-f6b6-444e7d9eafda&t=9d375de8-baa3-57ad-6628-9eaf4ea568de&l=82

But I don't think it's related to this change. It seems that libc, starting from v0.2.103, has began to depend on trait implementations for arbitrary length arrays (in rust-lang/libc#2409), which was stabilized in Rust 1.47.0 (release note).

the environment variable has broken procedural macro crates which
depends on `libsqlite3-sys`, such as `migrations_macros`.

even without the variable, `libsqlite3-sys` finds the correct path
anyway.

fixes cross-rs#520.
@tesaguri
Copy link
Contributor Author

Rebased onto master. The MSRV issue seems to have already been fixed by the upstream.

@reitermarkus
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 15, 2022

Build succeeded:

@bors bors bot merged commit 2cc449a into cross-rs:main Mar 15, 2022
@tesaguri tesaguri deleted the fix-520 branch March 15, 2022 12:04
@Emilgardis Emilgardis added this to the v0.2.2 milestone Jun 15, 2022
@Alexhuszagh Alexhuszagh added container-images A-bsd Area: BSD-family targets labels Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bsd Area: BSD-family targets container-images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling diesel-migrations for FreeBSD fails.
4 participants