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

openexr: fix non-cross-compilation #76940

Closed
wants to merge 1 commit into from
Closed

openexr: fix non-cross-compilation #76940

wants to merge 1 commit into from

Conversation

@volth
Copy link
Contributor

@volth volth commented Jan 4, 2020

cross-compilation support introduced in #61245 resulted in failed non-cross-compilation build:

.../bash ./b44ExpLogTable > b44ExpLogTable.h
./b44ExpLogTable: ./b44ExpLogTable: cannot execute binary file

because on non-cross-compilation stdenv.hostPlatform.emulator is bash and bash does not run ELF-binaries

cross-compilation support results in failed non-cross-compilation build:
```
.../bash ./b44ExpLogTable > b44ExpLogTable.h
./b44ExpLogTable: ./b44ExpLogTable: cannot execute binary file
```
@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Jan 4, 2020

@matthewbauer is this how you intended the emulator to work?

For openexr, they have switched upstream to just vendoring those headers, so all this can hopefully go away soon.

@volth
Copy link
Contributor Author

@volth volth commented Jan 5, 2020

yes, it is better to define what emulator suppose to do in the edge cases (such as non cross compilation or pkgs.i686Linux) and do fix there than merge my dirty ad-hoc fix

@FRidh FRidh added this to WIP in Staging via automation Jan 6, 2020
@danbst
Copy link
Contributor

@danbst danbst commented Feb 15, 2020

how to reproduce this issue?

@volth
Copy link
Contributor Author

@volth volth commented Feb 16, 2020

good question.

I see now it runs as

/nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-bash-4.4-p23/bin/bash -c '"$@"' -- ./b44ExpLogTable > b44ExpLogTable.h

instead of

/nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-bash-4.4-p23/bin/bash ./b44ExpLogTable > b44ExpLogTable.h

before.

But fail to see when it was fixed.

@flokli
Copy link
Contributor

@flokli flokli commented Apr 30, 2020

Hm, #86241 switched the build to cmake, and the automake-only cross-patches obviously have no effect anymore. I read IlmBase/Half/CMakeLists.txt and https://cmake.org/cmake/help/v3.13/command/add_custom_command.html, and it seems cmake has no understanding of native binaries invoked during the build process?!

@flokli
Copy link
Contributor

@flokli flokli commented Apr 30, 2020

Well, but this issue is about a broken non-cross compilation. Now cross-compilation is broken, and this should be a follow-up PR.

@flokli flokli closed this Apr 30, 2020
Staging automation moved this from WIP to Done Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.