parnoldx/nasc

Doesn't build with libqalculate 3.9.0

doronbehar opened this issue · 7 comments

On NixOS, we would like to update libqalculate to 3.9.0 per https://github.com/Qalculate/libqalculate/releases/tag/v3.9.0 . When testing dependencies of it in our packages collection, we are hitting this error for nasc:

building
build flags: -j2 -l2 SHELL=/nix/store/ffli6m23501dkiznwlkf6n4xvrj02snr-bash-4.4-p23/bin/bash
Scanning dependencies of target qalculatenasc
[  5%] Building CXX object libqalculatenasc/CMakeFiles/qalculatenasc.dir/QalculateNasc.cc.o
/build/source/libqalculatenasc/QalculateNasc.cc: In function 'char* get_function_name(int)':
/build/source/libqalculatenasc/QalculateNasc.cc:38:13: error: 'string' was not declared in this scope; did you mean 'std::string'?
   38 |             string str = ename_r->name;
      |             ^~~~~~
      |             std::string

Sounds like some compiler issue like #143

replace all string with std::string if you want to fix this. Master has libqalculate as submodule now

Using libqualculate as a submodule is not very good for Linux distros since we now need to fix issues in both the libqualculate package and nasc.

libqalculate in the ubuntu repos is ages old, so it's the way it will be.

There are ways to use a submodule on ancient distros and the system variant on modern ones. It is actually pretty easy in Meson: https://mesonbuild.com/Subprojects.html#toggling-between-system-libraries-and-embedded-sources

Also, I didn't manage to figure out how was this a "fix" for the issue presented - we are not ubuntu, the issue was with a rather recent libqalculate version we tried to use, isn't libqalculate 3.9.0 recent enough for your latest releases?

The submodule switch has nothing todo with this bug.
The target is the elementary OS and there a ancient libqalculate is present so that's why a submodule is used now.