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

FreeBSD docker image has headers and libs in wrong place #1367

Closed
4 of 11 tasks
ydirson opened this issue Nov 9, 2023 · 2 comments
Closed
4 of 11 tasks

FreeBSD docker image has headers and libs in wrong place #1367

ydirson opened this issue Nov 9, 2023 · 2 comments

Comments

@ydirson
Copy link
Contributor

ydirson commented Nov 9, 2023

Checklist

Describe your issue

headers are installed in $SYSROOT/include, when the compiler wants then in $SYSROOT/usr/include (and the same happens for lib).

If we passthrough BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_freebsd="--sysroot=/usr/local/x86_64-unknown-freebsd12 -v" we can see things like:

  --- stderr
  clang version 10.0.0-4ubuntu1 
  Target: x86_64-unknown-freebsd
  Thread model: posix
  InstalledDir: 
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/lib/llvm-10/lib/clang/10.0.0/include
   /usr/local/x86_64-unknown-freebsd12/usr/include
  End of search list.
  /usr/local/x86_64-unknown-freebsd12/usr/include/xenstore_lib.h:25:10: fatal error: 'errno.h' file not found

Workaround: start the pre-build hook with

mkdir -p /usr/local/x86_64-unknown-freebsd12/usr &&
ln -s ../include /usr/local/x86_64-unknown-freebsd12/usr/include &&
ln -s ../lib /usr/local/x86_64-unknown-freebsd12/usr/lib &&

What target(s) are you cross-compiling for?

x86_64-unknown-freebsd

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5 (44011c8 2023-10-23) [note: that's master not 0.2.5]

Example

No response

Additional information / notes

No response

@Emilgardis
Copy link
Member

Emilgardis commented Nov 9, 2023

there is also a problem with the BINDGEN_EXTRA_CLANG_ARGS_* for other targets, will have to identify those.

Specifically, I think targets returned by grep -L "ENV CROSS_SYSROOT=/usr/local/" --include='Dockerfile.*' -r ./docker need to be checked

edit: cc #1389

@Emilgardis
Copy link
Member

fixed with #1403

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

Successfully merging a pull request may close this issue.

2 participants