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

cmake-based build does not work on Nixpkgs #153

Open
AndersonTorres opened this issue Jun 4, 2023 · 2 comments
Open

cmake-based build does not work on Nixpkgs #153

AndersonTorres opened this issue Jun 4, 2023 · 2 comments

Comments

@AndersonTorres
Copy link

AndersonTorres commented Jun 4, 2023

Hello!

When I was updating pforth for nixpkgs (and using cmake for this), it failed with the following message:

[ 41%] Built target PForth_lib
[ 44%] Building C object CMakeFiles/pforth.dir/csrc/pf_main.c.o
[ 47%] Linking C executable fth/pforth
[ 47%] Built target pforth
[ 50%] pforth.dic
PForth V2.0.0, LE/64, built Jan 1 1980 00:00:00
Including: system.fth
pfIncludeFile could not open system.fth
make[2]: *** [CMakeFiles/pforth_dic.dir/build.make:73: fth/pforth.dic] Error 255
make[1]: *** [CMakeFiles/Makefile2:132: CMakeFiles/pforth_dic.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

Here is the full log: https://pastebin.com/jSqHJ1GV

Related issue (?): #106 (comment)

(On the other hand, the makefile-based approach works OK)

@philburk
Copy link
Owner

philburk commented Jun 4, 2023

I don't know why that would fail.
Is it possible the pforth repo was checked out while root?
If you cd into pforth and then enter "pwd" can you see any spaces in the path? That might confuse CMake.

What happens if you try:

cd platforms/unix
make all
./pforth_standalone

@AndersonTorres
Copy link
Author

I suspect it is failing because our cmake framework tries to build on a dedicated, out-of-source directory. pforth tries to read a file that is not there (because it wasn't copied).

I will read more about cmake to verify what is happening.


As you asked:

  1. Our build frameworks don't run as root; check!
  2. The sources are unpacked in a directory inside /tmp, and it has no spaces; check!
  3. The pure Makefile approach worked fine, allowing the update. Check!

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