Skip to content

Makefile: Use file name instead of file descriptor for .config target#210

Merged
thiagomacieira merged 1 commit intointel:mainfrom
AlfioEmanueleFresta:main
Oct 4, 2021
Merged

Makefile: Use file name instead of file descriptor for .config target#210
thiagomacieira merged 1 commit intointel:mainfrom
AlfioEmanueleFresta:main

Conversation

@AlfioEmanueleFresta
Copy link
Contributor

@AlfioEmanueleFresta AlfioEmanueleFresta commented Oct 2, 2021

The project makefile uses fd 9 to redirect output, when generating the contents of the .config file. Previously, it used fd 10, but was changed due to compatibility concerns (c88913e).

The build fails in environments where this file descriptor can't be used. I've encountered this error trying to build tinycbor as part of a dependency, from a Cargo crate build script which invokes make (see logs):

make[2]: *** read jobs pipe: Bad file descriptor.  Stop.
make[2]: *** Waiting for unfinished jobs....
/bin/sh: 1: 9: Bad file descriptor

Proposing a fix, changing the OUT variable to take a path to append to, instead of a redirection.

I've tested the change by running make, and verifying the contents of .config are the same as before my change.

@thiagomacieira thiagomacieira merged commit 6176e0a into intel:main Oct 4, 2021
@thiagomacieira
Copy link
Member

Thanks!

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 this pull request may close these issues.

2 participants