Ldpl-lang need classic confinenment

Hi! The ldpl language need execute ‘c++’ and read file at home.

For the read file can i use connect :home but for execute ‘c++’ compiler no.

I think I need use classic confinement

If c++ is not available in the base, add it as a staging dependency.

1 Like

Dont work. When i run “snapcraft --shell” and run in prime folder the binary its work without stage-package but if run “sudo snap install --devmode --dangerous *.snap” for install it and then run its no work.

its says: sh: 1: c++: not found

When staging the package g++ the same thing happens

Have a look at the snap file system, c++ is certainly in there if you have added it as a staging dependency. Then it might not be where ldpl expects it or in the PATH, so you should use layouts to make c++ and other commands such as the linker ld available to ldpl.

mmm ok. its better.

now output is:

In file included from /snap/ldpl-lang/x25/usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533:0,
from /snap/ldpl-lang/x25/usr/include/c++/7/iosfwd:38,
from /snap/ldpl-lang/x25/usr/include/c++/7/ios:38,
from /snap/ldpl-lang/x25/usr/include/c++/7/istream:38,
from /snap/ldpl-lang/x25/usr/include/c++/7/sstream:38,
from ldpl-temp.cpp:1:
/snap/ldpl-lang/x25/usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39:10: fatal error: features.h: No such file or directory
#include <features.h>
compilation terminated.
LDPL Error: compilation failed

Programming languages are well recognised use-cases for classic confinement as per Process for reviewing classic confinement snaps. In this case, if it is expected that the snap would use the c++ compiler and headers etc from the host then it makes sense for this to be granted classic confinement - @cavazquez can you describe more about what the dependencies for ldpl-lang are and if these are expected to come from the host environment or if they could possibly be shipped inside the snap itself?

Pure LDPL seems to require common headers and libraries and I was hoping they could all be embarked in the snap.

I believe the real problem is with LDPL C++ extensions that may require random headers and libraries. Of course the system C++ compiler could be used to build the extensions, but then the embarked C++ compiler and the system C++ compiler need to be compatible. I don’t know how stable the C++ ABI is these days - I haven’t programmed much in C++ lately - but I know it used to be a major source of nuisance.

The requirements for classic are understood. @advocacy, can you perform the vetting?

Vetting completed, and the publisher has been verified. +1 from me.

1 Like

Granting use of classic. This is now live.

1 Like