mywave82 / opencubicplayer

Open Cubic Player (unix fork). Music visualizer for various tracked music formats (amiga modules, S3M, IT), chiptunes and other formats related to demoscene
https://stian.cubic.org/project-ocp.php
GNU General Public License v2.0
280 stars 19 forks source link

OCP 0.2.107 won't configure, syntax error #113

Closed DrMcCoy closed 5 months ago

DrMcCoy commented 5 months ago
checking for main in -lstdc++... yes
checking for main in -lstdc++... (cached) yes
checking for std::basic_istream<char>... yes
checking for ldexp... yes
checking for long long... yes
checking for long double... yes
checking GIT submodules are checked out... ok
checking whether x86_64-pc-linux-gnu-g++ supports C++17 features with -std=c++17... yes
./configure: line 16557: syntax error near unexpected token `;;'
./configure: line 16557: `         ;;'

The lines around 16557 in configure are:

        if test $ax_cv_cxx_compile_cxx11__std_cpp11 == "yes"
then :
  printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h

         ;;
esac
fi

autoconf (GNU Autoconf) 2.72 automake (GNU automake) 1.16.5

mywave82 commented 5 months ago

Which os / distro / version are you at?

I guess you regenerated configure instead of using the provided one, did you get any warnings? You could also do a diff between the original one and the one you got and attach here

DrMcCoy commented 5 months ago

I'm running Gentoo GNU/Linux.

And yeah, I've regenerated the configure script with an autoconf call. Or rather, the ebuild I've got in my local Gentoo overlay does, with a call to to the eautoconf macro (which is, from what I understand, the recommended way).

There's one warning:

ac-wrapper: autoconf: warning: auto-detected versions not found ( 2.71 ); falling back to latest available

(Because I've got autoconf 2.72 instead of 2.71 installed)

Diff of the configure script before and after: configure.diff.txt

The configure calls resolves to

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/ocp-0.2.107 --htmldir=/usr/share/doc/ocp-0.2.107/html --libdir=/usr/lib64 --with-x11 --with-alsa --with-flac --with-mad --without-oss --without-sdl --with-sdl2 --without-dumptools --with-unifontdir-ttf=/usr/share/fonts/unifont/ --without-update-mime-database --without-desktop_file_install --without-update-desktop-database

In case that says anything to you, here's the ebuild I've hacked together and used since forever with older versions of OCP without problem (including a small patch that just there to stop the info page to be gzip'd, because the emerge doesn't like that and throws a warning):

ocp-0.2.107.ebuild.txt ocp-0.2.107-dont-gz-info.patch.txt

mywave82 commented 5 months ago

It appears that autoconf 2.72 has some bugs. Looking at the diff, it appears it insert "case" syntax around to isolate blocks. I do not have autoconf 2.72 so I am unable to test why and when it does it. I am guessing it might have problems with nested AS_IF.

mywave82 commented 5 months ago

Built autoconf 2.72 from source, so I am able to do some testing. Issue might be inbalance of ( ) [ and ]

DrMcCoy commented 5 months ago

Well, the source of the change seems to be this here: https://github.com/autotools-mirror/autoconf/commit/c8d6d6eb8be36144f1285f35901e325b56bac68f

DrMcCoy commented 5 months ago

Built autoconf 2.72 from source, so I am able to do some testing. Issue might be inbalance of ( ) [ and ]

Thanks for looking into this!

I admit my autoconf knowledge is pretty...slap-dash, mostly from reading other scripts for decades and furiously googling, and then being annoyed when something changed and what I hacked together doesn't work anymore. Though I still maintain all other build systems than autotools are still strictly worse :P

I hadn't even used nested AS_IF before, nor did I know that you could use multiple lines/statements there.

mywave82 commented 5 months ago

Thank you for posting the bug-report