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 compiling on macOS10.14.1 (recent update) #325

Open
danhambleton opened this issue Nov 25, 2018 · 7 comments
Open

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

danhambleton opened this issue Nov 25, 2018 · 7 comments

Comments

@danhambleton
Copy link

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

@floooh
Copy link
Owner

floooh commented Nov 26, 2018

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:

  • macOS: 10.14.2 Beta (18C48a)
  • Xcode: 10.1 (10B61)
  • clang --version: Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  • cmake --version: cmake version 3.13.0
  • python --version: Python 2.7.10 (the one that comes preinstalled on macOS)

Cheers!

@danhambleton
Copy link
Author

danhambleton commented Nov 26, 2018

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
Copy link
Owner

floooh commented Nov 26, 2018

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
Copy link
Author

danhambleton commented Nov 26, 2018

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
Copy link
Owner

floooh commented Nov 27, 2018

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

  • ./fips clean (that's important to remove the partially generated shader files)
  • ./fips gen + open (to open Xcode)
  • select and build the ALL_GENERATE target, and post the output here like in this screenshot:

screen shot 2018-11-27 at 10 15 28 am

@danhambleton
Copy link
Author

danhambleton commented Nov 27, 2018


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
Copy link
Owner

floooh commented Nov 29, 2018

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:

  • whether the oryol-shdc executable works:
# from the oryol project directory:
> cd tools/osx
> ./oryol_shdc -help
Oryol SPIR-V to GLSL/HLSL/MSL cross-compiler
Based on SPIRV-Cross: https://github.com/KhronosGroup/SPIRV-Cross
-help		-- show help
-spirv		-- SPIR-V input file
-o		-- output file
-lang		-- target language (glsl100, glsles3, glsl120, glsl330, metal, hlsl

...and it would be interesting whether any cross-compiled shader files are generated at all (this is done by the oryol-shdc tool):

> cd ../fips-build/oryol/osx-xcode-debug/code/Samples/Triangle
> ls
CMakeFiles              oryol.build             shaders_fs.glsl.frag    shaders_fs.glsl330.json shaders_vs.glsl330
Info.plist              shaders.cc              shaders_fs.glsl.spv     shaders_vs.glsl.spv     shaders_vs.glsl330.json
cmake_install.cmake     shaders.h               shaders_fs.glsl330      shaders_vs.glsl.vert

Note the *.spv and .glsl330 files. Do these exist?

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