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

Issue building on Alpine 3.21 #530

Open
adamthiede opened this issue Jan 8, 2025 · 14 comments
Open

Issue building on Alpine 3.21 #530

adamthiede opened this issue Jan 8, 2025 · 14 comments

Comments

@adamthiede
Copy link

I've been able to build Alephone on previous versions of Alpine with no issues for a few years now, but have not been able to build it yet on 3.21; I receive this error:

In file included from game_wad.cpp:93:
../../Source_Files/GameWorld/effects.h:156:17: error: expected ',' or '...' before '(' token
  156 | #define effects (EffectList.data())
      |                 ^
../../Source_Files/GameWorld/effects.h:156:17: error: expected ',' or '...' before '(' token
  156 | #define effects (EffectList.data())
      |                 ^

Alpine is musl-based so that may be part of the issue. I'm fine carrying a patch in my personal builds, I'd just like to know how to work around this, if I can.

Thank you!

@treellama
Copy link
Member

I'm afraid I don't understand why this would be an error. What compiler are you using?

@adamthiede
Copy link
Author

adamthiede commented Jan 8, 2025

Using gcc, pretty recent versions of everything. Here's the output of ./configure.

configure-output.txt

Main difference I can see is gcc13 was used with alpine 3.20, and gcc14 is used in 3.21. I'll see if I can get another OS with gcc14 to reproduce this.

@adamthiede
Copy link
Author

I get the same error on Arch Linux, which also has GCC14.

In file included from game_wad.cpp:93:
../../Source_Files/GameWorld/effects.h:156:17: error: expected ‘,’ or ‘...’ before ‘(’ token
  156 | #define effects (EffectList.data())
      |                 ^
../../Source_Files/GameWorld/effects.h:156:17: error: expected ‘,’ or ‘...’ before ‘(’ token
  156 | #define effects (EffectList.data())
      |                 ^

@djvs
Copy link

djvs commented Jan 12, 2025

Same problem. Diff attached that removes the effects macro. Build still failing on Arch-likes for other reasons (ffmpeg API mismatch, see #522 )

https://gist.github.com/djvs/bc099d357b4fca5cac81ac21a375ba71

@treellama
Copy link
Member

Can you post the actual gcc version? I just built with 14.2.0 in ubuntu with no issues. That effects macro is valid syntax, I hesitate to remove it just because of one buggy compiler version.

@djvs
Copy link

djvs commented Jan 12, 2025

g++ (GCC) 14.2.1 20240910

@treellama
Copy link
Member

treellama commented Jan 12, 2025

Where are you getting 14.2.1 from? The latest tarball on GNU's ftp is 14.2.0 https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/

Edit: they must be building from git. Compiling that now, I'll give it a try

@djvs
Copy link

djvs commented Jan 12, 2025

@treellama
Copy link
Member

compiles fine with gcc (GCC) 14.2.1 20240912 as well (with --disable-ffmpeg)...

I wonder if there are some extra patches or something else at play. I'll try to allocate time to figure out how to install Arch in a VM

@djvs
Copy link

djvs commented Jan 13, 2025

I was doing a local build with Artix (Arch-based) updated a few days ago, right from git master.

@adamthiede
Copy link
Author

I wonder if there are some extra patches or something else at play. I'll try to allocate time to figure out how to install Arch in a VM

If you don't mind using docker/podman, distrobox would be a quick way to test it.

@brad0
Copy link

brad0 commented Jan 31, 2025

I was going to file an issue, but happened to click on this one and noticed the mentioned error seems to be the same as what we noticed on OpenBSD after updating OpenAL to 1.24.x. We use Clang as a compiler.

c++ -DHAVE_CONFIG_H -I. -I../..  -I../../Source_Files/CSeries -I../../Source_Files/GameWorld -I../../Source_Files/Input -I../../Source_Files/Misc -I../../Source_Files/ModelView -I../../Source_Files/Network -I../../Source_Files/Network/Metaserver -I../../Source_Files/TCPMess -I../../Source_Files/RenderMain -I../../Source_Files/RenderOther -I../../Source_Files/Sound -I../../Source_Files/XML -I../../Source_Files -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/SDL2 -I/usr/local/include -DHWY_SHARED_DEFINE -DAVIF_DLL -I/usr/local/include/webp -I/usr/X11R6/include -D_REENTRANT -I/usr/local/include -I/usr/local/include/AL -I/usr/local/include -I/usr/local/include/opus  -I/usr/local/include/SDL2 -I/usr/X11R6/include -D_REENTRANT -I/usr/local/include/SDL2 -I/usr/X11R6/include -D_REENTRANT -I/usr/local/include -I/usr/local/include/SDL2 -I/usr/X11R6/include -D_REENTRANT -DSDL  -O2 -pipe -MT game_wad.o -MD -MP -MF $depbase.Tpo -c -o game_wad.o game_wad.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from game_wad.cpp:102:
In file included from ../../Source_Files/Misc/preferences.h:59:
In file included from ../../Source_Files/Sound/SoundManager.h:29:
In file included from ../../Source_Files/Sound/SoundPlayer.h:4:
In file included from ../../Source_Files/Sound/AudioPlayer.h:5:
/usr/local/include/AL/alext.h:821:90: error: expected ')'
typedef void (AL_APIENTRY *LPALGENEFFECTSDIRECT)(ALCcontext *context, ALsizei n, ALuint *effects) AL_API_NOEXCEPT17;
                                                                                         ^
../../Source_Files/GameWorld/effects.h:156:28: note: expanded from macro 'effects'
#define effects (EffectList.data())
                           ^
/usr/local/include/AL/alext.h:821:90: note: to match this '('
../../Source_Files/GameWorld/effects.h:156:17: note: expanded from macro 'effects'
#define effects (EffectList.data())
                ^
In file included from game_wad.cpp:102:
In file included from ../../Source_Files/Misc/preferences.h:59:
In file included from ../../Source_Files/Sound/SoundManager.h:29:
In file included from ../../Source_Files/Sound/SoundPlayer.h:4:
In file included from ../../Source_Files/Sound/AudioPlayer.h:5:
/usr/local/include/AL/alext.h:822:99: error: expected ')'
typedef void (AL_APIENTRY *LPALDELETEEFFECTSDIRECT)(ALCcontext *context, ALsizei n, const ALuint *effects) AL_API_NOEXCEPT17;
                                                                                                  ^
../../Source_Files/GameWorld/effects.h:156:28: note: expanded from macro 'effects'
#define effects (EffectList.data())
                           ^
/usr/local/include/AL/alext.h:822:99: note: to match this '('
../../Source_Files/GameWorld/effects.h:156:17: note: expanded from macro 'effects'
#define effects (EffectList.data())
                ^
2 errors generated.

@treellama
Copy link
Member

That's a different error (your clang correctly handled the macro), but it's still valid.

@brad0
Copy link

brad0 commented Jan 31, 2025

That's a different error (your clang correctly handled the macro), but it's still valid.

Oh, Ok. I will open another issue. Thanks.

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

4 participants