Closed Ghoughpteighbteau closed 3 years ago
Hi, don't know. I am not into build stuff. Seems to happen when building the subproject https://github.com/Qalculate/libqalculate Maybe you can try to build it alone if it happens there to.
Ah. Oops I should have noticed that. That's a good thing to check.
So I downloaded libqalculate's base repo and it successfully compiled.
I then tried moving into the submodule and building it there and it also successfully built.
So then I went back to nasc and... it failed again. Wut? I don't get it.
Oh by the way looking through the build failure I noticed a second error:
FAILED: subprojects/libqalculate/libqalculate/libqalculate.a.p/BuiltinFunctions-number.cc.o
Seems to be the same basic hasher error.
/usr/include/c++/10.2.0/backward/hashtable.h:604:23: error: no match for call to ‘(const hasher {aka const __gnu_cxx::hash<std::__cxx11::basic_string<char> >}) (const key_type&)’
604 | { return _M_hash(__key) % __n; }
So weird.
Mhh, ok. Then it's either the little older state of the subproject or more likely the meson build for libqalculate (upstream uses autotools)
Looks like the subproject is on current master of libqalculate, so that should be ok.
Could you do something like depend on an external library if not present?
something like... dep = dependency('foo', fallback : [subproject_name, variable_name])
?
oops. wrong button.
If it still build fine on elementary os yes sure
Well. I took a solid stab at it but I really don't know what I'm doing either lol.
Maybe @hanna-kn ? Plz help I no speak meson.
Dude pls don't ping hanna for stuff like this. Like I said libqualculate upstream uses autotools not meson. The meson is only here, so it can be better integrated with this project. Anyway I am open for PRs but closing this as out of scope for this project.
I do not mind providing a quick answer. The issue here seems obvious – HAVE_UNORDERED_MAP
is not set. When using autotools, this is set by AC_CHECK_HEADERS([unordered_map])
in configure.ac.
Ah I didn't realize libqalculate added those meson.build files specifically for nasc. Sorry, wasn't trying to be rude.
Thanks for the response Hanna. As a sneaky check I went and deleted the #if HAVE_UNORDERED_MAP
macros from libqalculate, leaving behind:
# include <unordered_map>
using std::unordered_map;
just to assume it was set, and that worked. nasc builds under these conditions. I'm not sure how to exactly set that from in meson. But that was a super helpful clue!
edit:
So if I revert my changes and throw in config_data.set('HAVE_UNORDERED_MAP', '1')
in libqalculate's meson.build, that works as well, but that doesn't seem right, I'd presume we need to check if we actually have unordered map somehow? I'm not familiar with how autotools is checking this and the conditions on which it sets those values. Or even if such a setting is reasonable for elementaryOS.
@parnold-x if you'd like me to buzz off, I can just introduce a patch into the AUR PKGFILE.
Thanks Hanna! Just thought to not bother you. @Ghoughpteighbteau No that's not what I mean't, I personally jut got no time and motivation for this build stuff. I still happy to merge a solution. Not sure what this UNORDERED_MAP thing does. Maybe as build option to pass to meson or as default when it does not matter? To check the build on eOS, you can open a PR and it should build it.
It's should be safe to always set HAVE_UNORDERED_MAP to 1 (unordered_map should be supported on everything but very old systems – hash_map is deprecated since GCC 4.3).
Describe the bug Build failure on arch linux
To Reproduce Steps to reproduce the behavior: If you have docker, I have a Dockerfile that can reproduce the issue exactly.
To use this:
docker build -t arch-nasc .
docker run --rm -it arch-nasc
ninja -C build install
The output of this produces this error:
I suspect this may be an error due to an updated library, Maybe a canary for an upcoming problem you will face later? Regardless, I'm clueless how to fix this.