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

No tup entry for config/macosx #8

Closed
hoosierEE opened this issue Jan 19, 2016 · 6 comments
Closed

No tup entry for config/macosx #8

hoosierEE opened this issue Jan 19, 2016 · 6 comments

Comments

@hoosierEE
Copy link
Contributor

System is: Mac OSX 10.11.2

Note that I installed tup via Homebrew, which required two steps due to some kext permission thing:

$ brew install Caskroom/cask/osxfuse
$ brew install homebrew/fuse/tup

Here is the full output:

$ tup
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.003s] Reading in new environment variables...
[ tup ] [0.003s] Parsing Tupfiles...
* 1) [0.002s] .
tup error: Unable to find tup entry for file 'config/macosx'
tup error: Failed to parse included file 'config/macosx'
tup error: Error parsing Tupfile line 16
  Line was: 'include config/@(TUP_PLATFORM)'
 [     ETA~=<1s      ]   5%
 *** tup: 1 job failed.

Tried on the develop branch to be thorough; same error:

$ git checkout develop
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'
$ tup
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.024s] Reading in new configuration/environment variables...
 1) updated variant: tup.config
 [ ] 100%
[ tup ] [0.027s] Parsing Tupfiles...                                                                                   
* 1) [0.002s] .
tup error: Unable to find tup entry for file 'config/macosx'
tup error: Failed to parse included file 'config/macosx'
tup error: Error parsing Tupfile line 16
  Line was: 'include config/@(TUP_PLATFORM)'
 [     ETA~=<1s      ]   5%
 *** tup: 1 job failed.
$ 
@hoosierEE
Copy link
Contributor Author

Ah well I now have a very rudimentary understanding of Tup and this error is simply saying that we haven't yet made a config/macosx file for Tup to read.

@iocane
Copy link
Owner

iocane commented Jan 19, 2016

That's right, we need to make a config/macosx file. I imagine it should be very similar to the linux file. If you want to try it out, copy the linux file, then I can help you fix any issues if you paste the output here.

@hoosierEE
Copy link
Contributor Author

Maybe making progress, not sure yet.

Merely changing the *.so into *.dylib is not sufficient to produce a working executable on OSX.

One issue I noticed so far:

In the file hostdefs.sym the line <pcreposix.h> should be "pcreposix.h" because it's a local include. This requires a change to sym2ijs.ijs because it's currently only looking for header files wrapped in angle brackets <likethis.h>.

I'll give it a go tomorrow if I have time.

@iocane
Copy link
Owner

iocane commented Jan 19, 2016

I had the same problem with the sym2ijs script. Instead of changing it, I just added -an I option to gcc to tell it to search for headers in that directory. Maybe it's not being picked up properly or is more strict on Mac. Which compiler are you using?

@hoosierEE
Copy link
Contributor Author

I have both clang and gcc on that system so I'm not 100% sure, but the Tupfile tests for the presence of clang first so probably clang. Will test tomorrow.

@iocane
Copy link
Owner

iocane commented Jan 20, 2016

Actually, after looking again I see that I did not add -Isrc/libj/defs to the compile command. I don't know why it works in Linux but the OSX compiler probably treats it differently than gcc on Linux. Try this when you get a chance: change this

: foreach $(defdir)/*.c |> ^ CC %f^ $(CC) %f -o %o |> bin/%B {defs}

to:

: foreach $(defdir)/*.c |> ^ CC %f^ $(CC) -Isrc/libj/defs %f -o %o |> bin/%B {defs}

iocane added a commit that referenced this issue Jan 20, 2016
@iocane iocane closed this as completed Jan 20, 2016
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