Greetings, I’m new here and I’m trying to build my first snap.
I’m trying to create a snap of the FreeBASIC compiler, and I got as far as getting a ‘hello world’ program to compile with it.
However, when I try to compile anything more complex, the compiler simply can’t see the ‘.a’ libraries it needs.
In a regular installation, the ‘.a’ files are located in /usr/lib/x86_64-linux-gnu/ .
In my snap, they end up in ‘/snap/freebasic/current/usr/lib/x86_64-linux-gnu/’, but when the compiler calls ‘ld’, it just can’t see them.
How do I fix that?
Thanks in advance!
This is what I have so far:
name: freebasic # you probably want to 'snapcraft register <name>'
base: core18
version: '1.07.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Free/open source (GPL), BASIC compiler. # 79 char long summary
description: |
FreeBASIC is a self-hosting compiler which makes use of the GNU binutils
programming tools as backends and can produce console, graphical/GUI executables,
dynamic and static libraries. FreeBASIC fully supports the use of C libraries and
has partial C++ library support. This lets programmers use and create libraries
for C and many other languages. It supports a C style preprocessor, capable of
multiline macros, conditional compiling and file inclusion.
grade: devel # must be 'stable' to release into candidate/stable channels #devel
confinement: devmode # use 'strict' once you have the right plugs and slots #devmode
architectures:
- build-on: [amd64, i386]
run-on: [amd64, i386]
parts:
fbc:
plugin: dump
source: ../usr/local/bin
organize:
fbc: usr/local/bin/fbc
fbc64: usr/local/bin/fbc64
ar: usr/bin/ar
as: usr/bin/as
gcc: usr/bin/gcc
gdb: usr/bin/gdb
ld: usr/bin/ld
build-attributes: [keep-execstack]
stage-packages: [gcc-multilib, build-essential, libc6-dev, libstdc++6, libtinfo5, libncurses-dev, libx11-dev, libxext-dev, libxpm-dev, libxrandr-dev, libxrender-dev, zlib1g, libzip-dev, libgl-dev]
local:
plugin: dump
source: ../usr
organize:
local: usr/local
apps:
fbc:
command: usr/local/bin/fbc
plugs: [home]