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

ViZDoom/vizdoom_src/src/sound/efx.h:203:27: error: expected ')' #39

Closed
muupan opened this issue Apr 24, 2016 · 3 comments
Closed

ViZDoom/vizdoom_src/src/sound/efx.h:203:27: error: expected ')' #39

muupan opened this issue Apr 24, 2016 · 3 comments

Comments

@muupan
Copy link

muupan commented Apr 24, 2016

I'm trying to build VizDoom in OS X 10.11.4. I get compile errors when running make as follows.

In file included from /Users/user/ViZDoom/vizdoom_src/src/sound/i_sound.cpp:57:
In file included from /Users/user/ViZDoom/vizdoom_src/src/sound/oalsound.h:61:
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:203:27: error: expected ')'
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:203:14: note: to match this '('
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:27: error: expected ')'
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:14: note: to match this '('
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:205:32: error: expected ')'
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
                               ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:205:19: note: to match this '('
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
                  ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:205:20: error: typedef redefinition with different types ('ALboolean (ALuint)' vs 'void (ALsizei, ALuint *)')
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
                   ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:206:27: error: expected ')'
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:206:14: note: to match this '('
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:206:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALint)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:207:27: error: expected ')'
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:207:14: note: to match this '('
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:207:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALint *)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:208:27: error: expected ')'
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:208:14: note: to match this '('
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:208:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALfloat)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:209:27: error: expected ')'
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:209:14: note: to match this '('
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:209:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALfloat *)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:210:27: error: expected ')'
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:210:14: note: to match this '('
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:210:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALint *)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:211:27: error: expected ')'
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:211:14: note: to match this '('
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:211:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALint *)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:212:27: error: expected ')'
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:212:14: note: to match this '('
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
             ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:212:15: error: typedef redefinition with different types ('void (ALuint, ALenum, ALfloat *)' vs 'void (ALsizei, ALuint *)')
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:204:15: note: previous definition is here
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*);
              ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:213:27: error: expected ')'
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
                          ^
/Users/user/ViZDoom/vizdoom_src/src/sound/efx.h:213:14: note: to match this '('
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [vizdoom_src/src/CMakeFiles/vizdoom.dir/sound/i_sound.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [vizdoom_src/src/CMakeFiles/vizdoom.dir/all] Error 2
make: *** [all] Error 2

Below are the messages of cmake.

$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON .
-- Found BZip2: /usr/lib/libbz2.dylib (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found JPEG: /usr/local/lib/libjpeg.dylib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Could NOT find GME (missing:  GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using system bzip2 library
-- Using internal gme library
-- Performing Test HAVE_NO_ARRAY_BOUNDS
-- Performing Test HAVE_NO_ARRAY_BOUNDS - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- /usr/include
-- /usr/include
-- /Users/user/ViZDoom/vizdoom_src/lzma/C
-- Looking for itoa
-- Looking for itoa - not found
-- Performing Test DUMB_CAN_USE_SSE
-- Performing Test DUMB_CAN_USE_SSE - Success
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.1")
-- Found OpenAL: /Library/Frameworks/OpenAL.framework
-- Could not find FMOD include files
-- Could NOT find SndFile (missing:  SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-- Could NOT find MPG123 (missing:  MPG123_LIBRARIES MPG123_INCLUDE_DIR)
-- Could NOT find FluidSynth (missing:  FLUIDSYNTH_LIBRARIES FLUIDSYNTH_INCLUDE_DIR)
-- Looking for filelength
-- Looking for filelength - not found
-- Looking for strupr
-- Looking for strupr - not found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for strnicmp
-- Looking for strnicmp - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for clock_gettime
-- Looking for clock_gettime - not found
-- Could not find clock_gettime. Timing statistics will not be available.
-- Performing Test HAS_VA_COPY
-- Performing Test HAS_VA_COPY - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   system
--   date_time
--   chrono
--   atomic
-- Fluid synth libs: FLUIDSYNTH_LIBRARIES-NOTFOUND
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   filesystem
--   thread
--   system
--   date_time
--   chrono
--   regex
--   iostreams
--   atomic
-- Found PythonInterp: /Users/user/.pyenv/shims/python2.7 (found suitable version "2.7.11", minimum required is "2.7")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable version "2.7.10", minimum required is "2.7")
-- Found PythonInterp: /Users/user/.pyenv/shims/python2.7 (found version "2.7.11")
-- Found NUMPY: /Users/user/.pyenv/versions/anaconda2-2.5.0/lib/python2.7/site-packages/numpy/core/include
-- Found components for NumPy
-- NUMPY_ROOT_DIR    = /usr/local
-- NUMPY_INCLUDES    = /Users/user/.pyenv/versions/anaconda2-2.5.0/lib/python2.7/site-packages/numpy/core/include
-- NUMPY_LIBRARIES   =
-- NUMPY_API_VERSION = 1.10.4
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   python
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   vizdoomshared

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/user/ViZDoom

Any help would be appreciated.

@mwydmuch
Copy link
Collaborator

Your problem occurs when building ZDoom engine with OpenAL, it is optional, so try to build without it - add -DNO_OPENAL=ON to cmake command.

@muupan
Copy link
Author

muupan commented Apr 24, 2016

I successfully built it by adding -DNO_OPENAL=ON. Thank you so much!

But when I ran bin/vizdoom there was no sound, so I sought a way to build with OpenAL. I succeeded as follows:

  1. Apply this change rheit/zdoom@ce8b297 (otherwise there would be no sound even if you build with OpenAL)
  2. brew install openal-soft to install another OpenAL
  3. cmake in ViZDoom without -DNO_OPENAL=ON
  4. Modify CMakeCache.txt so that OPENAL_INCLUDE_DIR:PATH=/usr/local/opt/openal-soft/include/AL and OPENAL_LIBRARY:FILEPATH=/usr/local/opt/openal-soft/lib
  5. make

I would really appreciate it if anyone can share a better way to deal with this problem.

@mwydmuch
Copy link
Collaborator

I have added that fix, thank You.
It is possible to add -DOPENAL_INCLUDE_DIR=path/to/openal/includes and -DOPENAL_LIBRARY=path/to/openal/lib to cmake command.

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