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

Fix crash in modelcompiler and add missing DESTDIR. #4510

Merged
merged 2 commits into from Jan 4, 2019

Conversation

Projects
None yet
4 participants
@orbea
Copy link
Contributor

orbea commented Jan 4, 2019

This fixes the crash in modelcompiler described in comment #4506 (comment). The solution is thanks to sturnclaw in irc.

It also adds a missing ${DESTDIR} to CMakeLists.txt so the data files are installed to the correct location.

The remaining problem is that the modelcompiler doesn't have a way to specify an output directory and doesn't respect ${DESTDIR} as a result.

orbea added some commits Jan 4, 2019

Fix modelcompiler crash when opengl.txt doesn't exist.
This crash is reproduced during the build when ran with sandbox.

Further fixes #4506
cmake: Add missing DESTDIR.
This will be installed directly to the file system even when DESTDIR
is used.
@Web-eWorks

This comment has been minimized.

Copy link
Contributor

Web-eWorks commented Jan 4, 2019

Specifically, the issue is that the modelcompiler doesn't have a way to process an arbitrary directory. The output directory (especially for an inplace build) is the same as the input directory, which assumes that the data/ dir has already been installed to it's final resting place.

@Web-eWorks

This comment has been minimized.

Copy link
Contributor

Web-eWorks commented Jan 4, 2019

@impaktor: I'll be addressing the modelcompiler issue in another PR; this one's good to merge.

@orbea

This comment has been minimized.

Copy link
Contributor

orbea commented Jan 4, 2019

I think this might of also fixed the gcc travis build, only the static check is failing.

@Web-eWorks

This comment has been minimized.

Copy link
Contributor

Web-eWorks commented Jan 4, 2019

@orbea Travis build was fixed by #4509 (see the green check), but this certainly helps. Static checks will be relevant and working once the great clang-format PR gets merged.

@impaktor impaktor merged commit b97fe61 into pioneerspacesim:master Jan 4, 2019

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details

@orbea orbea deleted the orbea:sandbox branch Jan 4, 2019

@pcercuei

This comment has been minimized.

Copy link
Contributor

pcercuei commented Jan 5, 2019

From my tests, and confirmed by @orbea over IRC, the addition of ${DESTDIR} is not needed, as:

  • the data files properly installed to the expected directory when running DESTDIR=/tmp/foo ninja install even before this addition;
  • ${DESTDIR} probably resolves to an empty string, as it is an environment variable and not a cmake variable (it should have been $ENV{DESTDIR}

Therefore I suggest that we revert b97fe61.

@Web-eWorks

This comment has been minimized.

Copy link
Contributor

Web-eWorks commented Jan 6, 2019

Can confirm that ${DESTDIR} does not produce any observable result and is contrary to the way the DESTDIR functionality works. +1 for revert.

@pcercuei

This comment has been minimized.

Copy link
Contributor

pcercuei commented Jan 6, 2019

Reverted in #4513.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment