Compilation fails with undeclared identifier 'yyrhs'
Posted: Sat Nov 20, 2021 5:16 am
I'm trying to compile linuxsampler v2.2.0 (and dependencies) in Ubuntu 18.04.6 LTS following the instructions in http://linuxsampler.org/downloads.html (note *)
I've checked that my distro did not have apt installed any of those packages, but did have the ones that were obviously needed, such as intltool, libgtk2.0-dev, gtkmm-2.4 and many, many others.
I've successfully compiled and installed libgig v4.3.0 with gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04). Now I am trying to install linuxsampler.
The configure gives a WARNING about the non-trivial designated initializers not supported, specifying that "You will be able to compile LinuxSampler, but you will not be able to compile the test cases", but the compilation fails with non-trivial designated initializers not supported nevertheless. Probably that configure warning should be changed into an ERROR? But that's secondary.
Switching to clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) fails with:
lscp.y:1386:18: error: use of undeclared identifier 'yyprhs'
for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i)
^
lscp.y:1386:32: error: use of undeclared identifier 'yyrhs'
for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i)
^
lscp.y:1387:13: error: use of undeclared identifier 'yyrhs'
if (yyrhs[i] >= YYNTOKENS) return false;
^
Just in case that's an issue related to compiling code with clang against a library compiled with with gcc (rare, but...) I uninstall libgig, recompile it with clang and reinstall it. I guess I should do the same with all the dependencies, but those are too many to enter that rabbit hole. Anyway, after recompiling the libgig the error persists.
According to viewtopic.php?t=3355 the problem should be solved by installing liblscp first (despite from the dependency graph that does not seem to be the case). But I do it anyway, and the problem is still there. Since that thread explicitly mention liblscp-0.5.8.tar.bz2 I download that version and use ag to look for the yyrhs identifier in case that has been moved or renamed in subsequent releases, and the old version is laying around in build machines hiding this issue -- but nope, that's not there, so I am not even sure how it could have been fixed in the first place. I notice there is a liblscp-0.9.4.tar.gz in http://download.linuxsampler.org/packages/ so I try that (after uninstalling v0.9.3). Its README suggests to use cmake (rather than autoconf like for earlier versions), but since the autoconf infrastructure is still there, I use that since I've always had problems with cmake. No change. And here is where I'm stuck. I guess I can win my resistance to cmake and try that too, but I at this point I seriously doubt it'd make any difference.
Any suggestions on what I may be doing wrong will be greatly appreciated.
Thanks
* note: By the way, in addition to the dependency graph, an ordered list of what to compile first will make it much easier for people to understand what to do, for example from the plot it is not clear that LS needs to be installed before gigedit for the latter to work correctly... that is only said in an obscure message in the configure output which users may overlook
I've checked that my distro did not have apt installed any of those packages, but did have the ones that were obviously needed, such as intltool, libgtk2.0-dev, gtkmm-2.4 and many, many others.
I've successfully compiled and installed libgig v4.3.0 with gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04). Now I am trying to install linuxsampler.
The configure gives a WARNING about the non-trivial designated initializers not supported, specifying that "You will be able to compile LinuxSampler, but you will not be able to compile the test cases", but the compilation fails with non-trivial designated initializers not supported nevertheless. Probably that configure warning should be changed into an ERROR? But that's secondary.
Switching to clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) fails with:
lscp.y:1386:18: error: use of undeclared identifier 'yyprhs'
for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i)
^
lscp.y:1386:32: error: use of undeclared identifier 'yyrhs'
for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i)
^
lscp.y:1387:13: error: use of undeclared identifier 'yyrhs'
if (yyrhs[i] >= YYNTOKENS) return false;
^
Just in case that's an issue related to compiling code with clang against a library compiled with with gcc (rare, but...) I uninstall libgig, recompile it with clang and reinstall it. I guess I should do the same with all the dependencies, but those are too many to enter that rabbit hole. Anyway, after recompiling the libgig the error persists.
According to viewtopic.php?t=3355 the problem should be solved by installing liblscp first (despite from the dependency graph that does not seem to be the case). But I do it anyway, and the problem is still there. Since that thread explicitly mention liblscp-0.5.8.tar.bz2 I download that version and use ag to look for the yyrhs identifier in case that has been moved or renamed in subsequent releases, and the old version is laying around in build machines hiding this issue -- but nope, that's not there, so I am not even sure how it could have been fixed in the first place. I notice there is a liblscp-0.9.4.tar.gz in http://download.linuxsampler.org/packages/ so I try that (after uninstalling v0.9.3). Its README suggests to use cmake (rather than autoconf like for earlier versions), but since the autoconf infrastructure is still there, I use that since I've always had problems with cmake. No change. And here is where I'm stuck. I guess I can win my resistance to cmake and try that too, but I at this point I seriously doubt it'd make any difference.
Any suggestions on what I may be doing wrong will be greatly appreciated.
Thanks
* note: By the way, in addition to the dependency graph, an ordered list of what to compile first will make it much easier for people to understand what to do, for example from the plot it is not clear that LS needs to be installed before gigedit for the latter to work correctly... that is only said in an obscure message in the configure output which users may overlook