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

Not able to build PTEX on FreeBSD #72

Closed
michaelcw02 opened this issue May 26, 2023 · 2 comments
Closed

Not able to build PTEX on FreeBSD #72

michaelcw02 opened this issue May 26, 2023 · 2 comments

Comments

@michaelcw02
Copy link

Hi,

I'm currently trying to use PBRT v3 on several operating systems and one of them is FreeBSD. While trying to install PBRT I found an issue with the following error:

/ptex/src/ptex/PtexPlatform.h:73:10: faltal error: 'alloca.h' file not found
#include <alloca.h>

1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /ptex/build
*** Error code 1

Stop.
make[1]: stopped in /ptex/build
*** Error code 1

Stop.
make: stopped in /ptex/build

While troubleshooting, I found the following change in FreeBSD ports: https://cgit.freebsd.org/ports/commit/?id=5c793405d0e9f0aa05553a2888d6e31b1a17edb1

These were the specific changes that worked for me:

@michaelcw02
Copy link
Author

I'm proposing a solution that worked for me.

@davvid
Copy link
Member

davvid commented May 26, 2023

Thanks for the heads-up. I'd be in favor of having ifdefs in that file to help with BSD compatibility. If you submit a PR I'll be happy to review the changes.

I don't have a FreeBSD install handy so I can't test the build but the guards around alloca.h seem harmless to me.

@davvid davvid closed this as completed in 76a12b0 May 26, 2023
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

2 participants