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

Can't build strace toy #298

Closed
frikiluser opened this issue Oct 27, 2021 · 5 comments
Closed

Can't build strace toy #298

frikiluser opened this issue Oct 27, 2021 · 5 comments

Comments

@frikiluser
Copy link

Hi,

I'm not able to build allyesconfig since this commit d62ee37 due to undefined reference to xfork error.

I'm using Debian-amd64 based system.

Best regards,

@enh-google
Copy link
Collaborator

patch sent to mailing list. just a #if in portability.c that should have been a #ifdef... though i'm not sure why none of the other references to xfork() caused this.

@landley
Copy link
Owner

landley commented Oct 28, 2021

All the other references to xfork were in commands with depends on TOYBOX_FORK intheir config, because allyesconfig enables TOYBOX_FORCE_NOMMU and thus disables fork(). The CFG_XXX macros are always #defined (to either 0 or 1, so they can be used in if(blah) tests to trigger dead code elimination), so using #ifdef instead of #if to test them will always return "true".

The proper fix is to change this xfork() into an XVFORK() which should work but I want to think through it and test it (I haven't actually tried the strace in pending at all yet), which bumps it to this weekend? (Yes, it should theoretically be possible to implement an strace with nommu support...)

@enh-google
Copy link
Collaborator

enh-google commented Oct 28, 2021 via email

@frikiluser
Copy link
Author

As mentioned before, it fixes the reported problem 👍🏾

CONFIG_TOYBOX_FORK=y
CONFIG_TOYBOX_FORCE_NOMMU=n

@landley
Copy link
Owner

landley commented Aug 19, 2022

Alas, it's still in pending for a reason...

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

No branches or pull requests

3 participants