NVIDIAGameWorks / PhysX-3.4

NVIDIA PhysX SDK 3.4
https://www.nvidia.com/
2.35k stars 273 forks source link

Linux compilation fail #51

Closed GregSlazinski closed 6 years ago

GregSlazinski commented 6 years ago

doing "make release", gives:

greg@greg-VirtualBox:~/Desktop/Esenthel/ThirdPartyLibs/PhysX/PhysX/Source/compiler/linux64$ make release
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsAllocator.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsAssert.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsFoundation.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsMathUtils.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsString.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsTempAllocator.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/PsUtilities.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixAtomic.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixCpu.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixFPU.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixMutex.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixPrintString.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixSList.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixSocket.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixSync.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixThread.cpp...
PxFoundation: compiling release ./../../../../PxShared/src/foundation/src/unix/PsUnixTime.cpp...
building ../../../../PxShared/bin/linux64/libPxFoundation_x64.so complete!
PxPvdSDK: compiling release ./../../../../PxShared/src/pvd/src/PxProfileEventImpl.cpp...
In file included from ./../../../../PxShared/src/pvd/src/PxProfileEventImpl.cpp:31:0:
./../../../../PxShared/src/pvd/src/PxProfileEvents.h: In function ‘physx::profile::EventStreamCompressionFlags::Enum physx::profile::findCompressionValue(uint64_t, physx::profile::EventStreamCompressionFlags::Enum)’:
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:125:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if ( inValue <= UINT8_MAX )
    ^~
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:127:3: note: here
   case EventStreamCompressionFlags::U16:
   ^~~~
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:128:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if ( inValue <= UINT16_MAX )
    ^~
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:130:3: note: here
   case EventStreamCompressionFlags::U32:
   ^~~~
./../../../../PxShared/src/pvd/src/PxProfileEvents.h: In function ‘physx::profile::EventStreamCompressionFlags::Enum physx::profile::findCompressionValue(uint32_t, physx::profile::EventStreamCompressionFlags::Enum)’:
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:153:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
    if ( inValue <= UINT8_MAX )
    ^~
./../../../../PxShared/src/pvd/src/PxProfileEvents.h:155:3: note: here
   case EventStreamCompressionFlags::U16:
   ^~~~
cc1plus: all warnings being treated as errors
Makefile.PxPvdSDK.mk:179: recipe for target 'build/PxPvdSDK_release/PxShared/src/pvd/src/PxProfileEventImpl.cpp.o' failed
greg@greg-VirtualBox:~/Desktop/Esenthel/ThirdPartyLibs/PhysX/PhysX/Source/compiler/linux64$ 
AlesBorovicka commented 6 years ago

Hi, what compiler did you used?

GregSlazinski commented 6 years ago

Ubuntu 17.10 gcc --version shows 7.2.0

AlesBorovicka commented 6 years ago

Hmm we build on Ubuntu 16.04 and gcc up to 6.1. I try to update gcc and fix the errors. Thanks for the report.

AlesBorovicka commented 6 years ago

It should compile on latest gcc again.