Trying to make a snap of FreeBASIC : ld: cannot find -l*

Hey! Sorry about the delay, I was offline.

The reason I wanted both 32 and 64-bit…

I create games, and usually zip a package containing binaries for 32-bit Linux, 64-bit Linux and win32.

I can usually cross-compile. The win32 version won’t be a problem for me on 20.04, because it has nothing to do with the GLIBC version.

Well, maybe it’s time to drop the 32-bit Linux builds, who still uses it anyway?

Here’s what I have so far:

name: freebasic # you probably want to ‘snapcraft register ’

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] run-on: [amd64]

parts: fbc: source: ./myroot source-type: local plugin: dump stage-packages: [build-essential, gcc-multilib, gdb, libffi-dev, libgl1-mesa-dev, libc6-dev, libstdc++6, libtinfo5, libncurses-dev, libx11-dev, libxext-dev, libxpm-dev, libxrandr-dev, libxrender-dev, zlib1g, libzip-dev, libgl-dev]

apps:

fbc:

command: usr/local/bin/fbc

plugs: [home]

I have put everything I need in the right place, inside the “myroot” folder, so I don’t need to organize. Way easier.

I got it to snap again, I can install it and use it to compile a “hello world” program.

But I still have that problem with ld not finding the files.

The layout thing didn’t not work, because as, ar, gcc, gdb and ld are not files but links.

Trying to bind the target files instead of the links didn’t solve it either.

Almost there, I think.