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

Building issue with GCC 4.9.2 on Linux #1

Closed
akien-mga opened this issue Sep 18, 2014 · 12 comments
Closed

Building issue with GCC 4.9.2 on Linux #1

akien-mga opened this issue Sep 18, 2014 · 12 comments

Comments

@akien-mga
Copy link
Contributor

Hi there,

I'm getting the following issue when building caveexpress (master, i.e. f6d54f1) on Mageia 5 (development version) with GCC 4.9.2 (pre-release).

In file included from src/engine/common/CommandSystem.h:3:0, from src/engine/common/IConsole.h:4, from src/engine/common/Logger.h:3, from src/engine/common/IMap.h:4, from src/engine/common/SpriteDefinition.h:8, from src/engine/common/SpriteDefinition.cpp:1: src/engine/common/ICommand.h:137:33: error: expected unqualified-id before 'new' #define bind(className, method) new CommandFunctor<className>(this, &className::method) ^ src/engine/common/ICommand.h:137:33: error: expected unqualified-id before 'new' #define bind(className, method) new CommandFunctor<className>(this, &className::method) ^ Makefile:213: recipe for target 'debug-caveexpress-linux-x86_64/cavebot/engine/common/SpriteDefinition.cpp.o' failed

Here is a complete build log: http://paste.fedoraproject.org/134653/41106016/

@akien-mga
Copy link
Contributor Author

As a side note, could you change your reference to "SDL" with "SDL2"? It's quite misleading to see the configure script searching for SDL_mixer and SDL_net when it actually wants SDL2_mixer and SDL2_net (SDL2 is the upstream name, SDL being the 1.2 branch).

@mgerhardy
Copy link
Owner

The problem with SDL2 is that I'm checking for SDL.h - and the header has the same name in both versions.

check_headers() {
check_header_bundled "SDL.h" "sdl2"
[....]
}

@mgerhardy
Copy link
Owner

could you please compile with gcc -E and attach the output?

build/flags.mk can be modified to add the -E flag.

@akien-mga
Copy link
Contributor Author

could you please compile with gcc -E and attach the output?
build/flags.mk can be modified to add the -E flag.

Sorry I had forgotten about this, I'll do it asap.

@akien-mga
Copy link
Contributor Author

With the -E flag, I now get a linking issue as shown in this log: http://paste.fedoraproject.org/136591/68246214

I'm not 100% sure about the way I defined the flag, I simply appended "-E" to CFLAGS, CCFLAGS and CXXFLAGS, is that the correct way?

@mgerhardy
Copy link
Owner

Plesse run with

make Q=

That will print out the commandlines. The additional option only executes the preprocessor. It does not compiler anything. The resulting objects now contain the final source. Plesse pastebin the generated file that produced the error in your first log.

@akien-mga
Copy link
Contributor Author

Here is the BotBackend.cpp.o file that produces the error: http://dl.free.fr/piUJ0I48l
(I couldn't pastebin it because it's too large).

I'll try a run with make Q= and post the log.

Edit: With make Q= I'm back to the previous error: http://paste.fedoraproject.org/136651/41171179/ i.e.

src/engine/common/ICommand.h:137:33: error: expected unqualified-id before 'new'
 #define bind(className, method) new CommandFunctor<className>(this, &className::method)
                                 ^

@mgerhardy
Copy link
Owner

I need this file: debug-caveexpress-linux-x86_64/cavebot/engine/common/SpriteDefinition.cpp.o

The BotBackend.cpp.o looks fine. Thanks

@akien-mga
Copy link
Contributor Author

Here is the whole debug-caveexpress-linux-x86_64 directory (from the compilation with the -E flag): http://dl.free.fr/jQmxZIlhs

I'm amazed how small it is when compressed as tar.xz: 92 MB uncompressed, 600 kB compressed :-)

@mgerhardy
Copy link
Owner

if this is still an issue - please attach the file to this ticket. I'm not able to download the file from the hoster you linked

@akien-mga
Copy link
Contributor Author

Indeed the file expired. I'll try to build current master against the embedded SDL 2.0.4-dev version, and close this ticket if it works fine.

@akien-mga
Copy link
Contributor Author

I just built the debug version without issue against the embedded SDL2 version.

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