svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
239 stars 49 forks source link

Errors on latest build - SteamOS /Debian Jessie #30

Closed mdeguzis closed 8 years ago

mdeguzis commented 8 years ago

Lots of errors see the log below, starting at line 1139. There are quite a few, so no snipped here.

Full log: https://gist.github.com/ProfessorKaos64/620eb20303b046767f51f8b1271b235b#file-errors-L1139

My package build, linked below, builds without error (30-Jul-2016 16:09):

http://packages.libregeek.org/steamos-tools/pool/games/d/doom64ex/

To try and help myself with stability, going to fork just to get stable snaps for myself.

pinkwah commented 8 years ago

The version that I merged requires GCC 5.

I'd like to try and get away with using a newer C++ standard, but that might mean that you'll have a hard time compiling it on Debian.

mdeguzis commented 8 years ago

ah... ok, which is not in debian jessie. That's a problem for me. Building that is rough, unless you plan on supporting something easier to backport (which I have), such as clang/llvm. I'll have to stick with the version I have for the foreseeable future. This will cut off access for stable Jessie users for any new versions I try.

pinkwah commented 8 years ago

Seems like clang 3.4 has the required features, and jessie has 3.5 already.

mdeguzis commented 8 years ago

I have no problem trying and usign clang if it works. I'll try with clang, e.g. export CC=clang

pinkwah commented 8 years ago

export CXX=clang++ is more important.

mdeguzis commented 8 years ago

No luck with clang. Looking further here.. http://sprunge.us/PEOK

mdeguzis commented 8 years ago

I'll just keep checking out the build errors, and code updates from time to time. One example:

/build/doom64ex-0.20160801+git+bsos/include/kex/kexdef:85:12: error: 
      C++ requires a type specifier for all declarations
  ALIAS_FN($, std::tie)
           ^
/build/doom64ex-0.20160801+git+bsos/include/kex/kexdef:35:27: note: 
      expanded from macro 'ALIAS_FN'
    inline decltype(auto) NewName(Args&&... args)     \
                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

See: http://stackoverflow.com/questions/12972881/clang-c-requires-a-type-specifier

pinkwah commented 8 years ago

There. It compiles in my Jessie VM. Please confirm that it works for you too.

mdeguzis commented 8 years ago

if I do a build with:

export CC=clang
export CXX=clang++
rm  -rf build && mkdir build
cd build && cmake .. && make

I get this: http://slexy.org/view/s2wd4kKmSR

mdeguzis commented 8 years ago

The the build finished with this debian/rules specification. Any changes you'd make there? or include in a cmake setting in the code? Per the above, building with the steps in the readme, yields the above errors.

pinkwah commented 8 years ago

You don't need to set these CMAKE_* defines.

CMake figures out what compiler it uses based on CC and CXX. -std=c99 has been default (even though Windows, and thus d64ex, only has C89) for a long time and my CMakeFiles.txt uses -std=c++14. (Well, technically c++1y == c++14, so it doesn't matter.)

But that's me being pedantic. If it compiles it compiles.

I'm assuming everything is ok, so I'm closing this.

mdeguzis commented 8 years ago

I noted above, the standard build I used did not work. Clang is 3.5.0-10.

#!/usr/bin/make -f

# Upstream now using gcc5, which Jessie does not have
# Use clang

export CC=clang
export CXX=clang++

%:
    dh $@

override_dh_auto_configure:
    rm -rf build && mkdir -p build
    cd build && cmake .. && make
pinkwah commented 8 years ago

Try with -DCMAKE_BUILD_TYPE=Release

mdeguzis commented 8 years ago

Nope, hard stop seems to be (full log above):

cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make

error: debug information for auto is not yet supported
error: debug information for auto is not yet supported
2 errors generated.
src/kexlib/CMakeFiles/kexlib.dir/build.make:100: recipe for target 'src/kexlib/CMakeFiles/kexlib.dir/gfx/Image.cc.o' failed

This is in a clean pbuilder chroot. I do't use VM's with preinstalled software

pinkwah commented 8 years ago

The error: debug information for auto is not yet supported is because it's trying to create debug info, which it doesn't need to. Maybe the packaging tool tries to automatically create a -dbg version?

mdeguzis commented 8 years ago

I had clang-3.8 backported in my testing repo, which continues past that error. Some backstory here and here Hmm. If I do keep the cmake defines, I can use clang 3.5 from jessie. 3.5 should be fine if I think a flag is defined to not care about that debug info.

You can observe the problem by attempting to compile Cap'n Proto from
source code (https://capnproto.org/capnproto-c++-0.5.3.tar.gz) with the
following configure invocation:

    ./configure CXX=clang++ CXXFLAGS='-std=gnu++1y -g'

The error only occurs in C++14 mode (e.g. -std=gnu++1y or -std=c++14), not
in C++11 mode. The code compiles successfully in C++11 mode.

So if you must have c++14, then I'll have to bump higher on clang. And if so, CMake should check for that minimum version. Clang 3.6 should suffice if so.