floooh / oryol

A small, portable and extensible C++ 3D coding framework
MIT License
2k stars 200 forks source link

Not compiling on macOS10.14.1 (recent update) #325

Open danhambleton opened 6 years ago

danhambleton commented 6 years ago

I just updated Mojave and tried to built my project (which has been working great). I now get these errors: image Any suggestions?

floooh commented 6 years ago

Hmm, I've also been on Mojave since the beta (currently 10.14.2 and Xcode 10.1) and haven't noticed problems (except that GL support in GLFW is broken of course, so you should use metal-osx-xcode-debug, but at least compiling also still works with the GL backend).

The error message looks like the shader generation build step didn't work (the class DbgTextShader is created by the code generator).

If this is the case there should be other error messages earlier when the ALL_GENERATE target is built, can you check and copy-paste them here?

Also did you try the following?

> ./fips diag tools
...anything unusual here?
> ./fips clean all
...clean everything, just in case any partially generated files are around
...which might confuse the timestamp checking
> ./fips build
...and rebuild

All the versions again on my machine for cross-checking:

Cheers!

danhambleton commented 6 years ago

Interesting! The diagnostics reveals:

=== tools:
git:    found
cmake:  found
ccmake: found
make:   found
ninja:  OPTIONAL, NOT FOUND (required for building '*-ninja-*' configs)
xcodebuild: found
javac:  OPTIONAL, NOT FOUND (version 8 required for Android development, installed with the Java JDK)
java:   OPTIONAL, NOT FOUND (version 8 required for Android development, installed with the Java JDK)
python2:    found
ccache: OPTIONAL, NOT FOUND (used with './fips set ccache on')
/bin/sh: code: command not found
vscode: OPTIONAL, NOT FOUND (used as IDE with vscode configs)
clion:  OPTIONAL, NOT FOUND (used as IDE with clion configs)

So, looks like bin/sh is missing (or appears to be)? No idea why that might the case, but it does explain a lot.

Update: As expected, bin/sh is definitely on the machine and available via PATH. So, any ideas as to why fips doesn't pick it up?

floooh commented 6 years ago

No, the error message is misleading (I wonder why it's here though), it means that "/bin/sh" can't find "code" (the VSCode executable). So apart from the confusing message, everything is alright.

PS: I have fixed that confusing output problem.

danhambleton commented 6 years ago

Here is the output of the build step... build_debug.txt

In case it helps, DebugShaders.h is being created BUT the file is empty...

image

floooh commented 6 years ago

Ok, looks like the shader code generation had a problem. Can you do the following:

screen shot 2018-11-27 at 10 15 28 am
danhambleton commented 6 years ago

Showing Recent Messages

Prepare build
note: Using legacy build system

Build target ALL_GENERATE of project iogramx with configuration Debug

PhaseScriptExecution CMake\ Rules /Users/daniel/Dev/iogramx/fips-build/iogramx/osx-xcode-debug/oryol_Dbg/iogramx.build/Debug/ALL_GENERATE.build/Script-C0E09B622AD94DBEB561478C.sh
    cd /Users/daniel/Dev/iogramx/iogramx
    /bin/sh -c /Users/daniel/Dev/iogramx/fips-build/iogramx/osx-xcode-debug/oryol_Dbg/iogramx.build/Debug/ALL_GENERATE.build/Script-C0E09B622AD94DBEB561478C.sh

echo ""

cd /Users/daniel/Dev/iogramx/iogramx && /usr/local/bin/python /Users/daniel/Dev/iogramx/fips-build/iogramx/osx-xcode-debug/fips-gen.py /Users/daniel/Dev/iogramx/fips-build/iogramx/osx-xcode-debug/fips_codegen.yml
## shader code gen: /Users/daniel/Dev/iogramx/iogramx/src/shaders.glsl

It does seem to pick the shaders from my project (which uses oryol as an import), but no mention of the DebugShaders...

floooh commented 6 years ago

Hmm and below the line

## shader code gen: /Users/daniel/Dev/iogramx/iogramx/src/shaders.glsl

There's nothing else? At least until this line it looks as expected, the interesting part happens right after that log message though.

A few other things to check: