moai / moai-dev

This is the development repo of Moai SDK.
http://getmoai.com
944 stars 313 forks source link

issue when building on ubuntu #1161

Closed sebi-hgdata closed 9 years ago

sebi-hgdata commented 9 years ago

Hey, Tried building on ubuntu 14.04 but failed with error checking types of args and return type for recvfrom... In file included from /usr/include/png.h:526:0, from /home/travis/build/moaiforge/moai-sdk/src/moai-sim/MOAIImage.cpp:7: /usr/include/pngconf.h:371:12: error: ‘pngconf’ does not name a type /usr/include/pngconf.h:372:12: error: ‘__dont’ does not name a type`

Seen it also on some linux Travis builds.

This PR tries to fix this, but I don;t think it's the best solution as I'm not too familiar with C/C++

Sebi

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

sebi-hgdata commented 9 years ago

test :)

patrickmeehan commented 9 years ago

@halfnelson: did you know about this one?

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

patrickmeehan commented 9 years ago

@sebi-hgdata: thanks for the PR. we just setup a new plun for kicking orr our CI. no idea why it is so spammy with the asking - looking into that as well.

moai-sdk commented 9 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

david-pershouse commented 9 years ago

@sebi-hgdata it shouldn't be using /usr/include at all, the png library is vendored something must be broken with your build script

david-pershouse commented 9 years ago

what branch are you running and what commands are you using to build?

david-pershouse commented 9 years ago

@sebi-hgdata the commit provided probably solves the problem for you but is not the correct fix here I feel. We need to work out what is causing cmake to use your libpng-dev instead of the one in 3rdparty. I will look at this tonight

david-pershouse commented 9 years ago

i might need to set CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON on the build command line

david-pershouse commented 9 years ago

@sebi-hgdata @patrick will apply a fix, the real fix is to remove the include and the ifdef.

david-pershouse commented 9 years ago

thanks for the report and contribution!

sebi-hgdata commented 9 years ago

Thank you