Project

General

Profile

Bug #1049

[OpenAL] Unable to compile on x86_64 Linux

Added by vvv1 over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2012-05-25
% Done:

100%


Description

I've tried to compile release-1.9.8 on Fedora 16 Linux x86_64 and got the following error messages:

make2: Entering directory `/home/vvv/rpmbuild/BUILD/doomsday-1.9.8-build500/Build/plugins/openal'
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT -Wall -W -fPIC -DNDEBUG -DHOST_IS_64BIT -DDENG_STABLE -DUNIX -DDENG_NO_FIXED_ASM -DDENG_NO_RANGECHECKING -DQT_NO_DEBUG -I/usr/lib64/qt4/mkspecs/linux-g++ -I../../../doomsday/plugins/openal -I/usr/include -I../../../doomsday/engine/api -I../../../doomsday/plugins/openal/include -I/home/vvv/rpmbuild/BUILD/doomsday-1.9.8-build500/Build/plugins/openal/. -I../../../doomsday/plugins/openal -I. -o driver_openal.o ../../../doomsday/plugins/openal/src/driver_openal.cpp
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'sfxbuffer_t* DS_SFX_CreateBuffer(int, int, int)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:229:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../../../doomsday/plugins/openal/src/driver_openal.cpp:230:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_DestroyBuffer(sfxbuffer_t*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:245:15: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp:246:15: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Load(sfxbuffer_t*, sfxsample_s*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:266:18: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Play(sfxbuffer_t*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:295:14: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp:304:34: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Stop(sfxbuffer_t*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:317:20: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Refresh(sfxbuffer_t*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:327:18: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Set(sfxbuffer_t*, int, float)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:377:14: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
../../../doomsday/plugins/openal/src/driver_openal.cpp: In function 'void DS_SFX_Setv(sfxbuffer_t*, int, float*)':
../../../doomsday/plugins/openal/src/driver_openal.cpp:420:14: error: cast from 'void*' to 'ALuint {aka unsigned int}' loses precision [-fpermissive]
make2: * [driver_openal.o] Error 1
make2: Leaving directory `/home/vvv/rpmbuild/BUILD/doomsday-1.9.8-build500/Build/plugins/openal'
make1:
[sub-openal-make_default] Error 2
make1: Leaving directory `/home/vvv/rpmbuild/BUILD/doomsday-1.9.8-build500/Build/plugins'
make: *
* [sub-plugins-make_default-ordered] Error 2

ALuint defined in AL/al.h:

/** unsigned 32-bit integer */
typedef unsigned int ALuint;

But sizeof(void*) = 8 on x86_64. Is it safe to add CXXFLAGS+=-fpermissive to plugins/openal/openal.pro?

Labels: Sound (OpenAL)

History

#1 Updated by skyjake about 10 years ago

(originally posted by anonymous SF.net user)

This bug has been marked closed for milestone 1.9.8, but it is still present in 1.9.10. Compilation does complete if -fpermissive is passed to gcc, but could this potentially lead to runtime errors?

#2 Updated by skyjake almost 10 years ago

I've now properly fixed this in [commit 9c1fd1ee](http://github.com/skyjake/Doomsday-Engine/commit/9c1fd1ee90d333332660c1aeef1addae93c2770e).

It will be included in the next unstable build and/or a 1.9.10-1 patch release.

#3 Updated by skyjake almost 10 years ago

- milestone: v1.9.8 --> v1.10.0

#4 Updated by skyjake almost 10 years ago

(originally posted by anonymous SF.net user)

Thank you! I tested a patch on 1.9.10 applying this commit, and it compiles flawlessly now.

#5 Updated by skyjake about 9 years ago

- assigned_to: Jaakko Keranen

Also available in: Atom PDF