Missing file when running on Linux

Running DietPi linux, latest version. Fresh install. When trying to run my compiled code I get:

bash: ./test: cannot execute: required file not found

I’m not sure which required file its talking about. I cant do an ldd on it since its “not a dynamic executable”.

Is there something I can check to see what file its talking about?

you can run ldd command on this to see what it references:

ldd ./test

This is just a guess based on my own experiences, but it could be libsoup that’s missing.

Instructions on installing it are here:

Installed libsoup2.4-1:arm64… still same problem.

It looks like this is the error you get when trying to run a 32-bit executable on a 64-bit OS when the compatibility libs are not installed.

You can confirm this by calling

file <path/to/app>

file x produces:

x: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, not stripped

so I did:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libc6:i386 libncurses5:i386 libstdc++6:i386

Same error:

root@DietPi:~/here# file x
x: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, not stripped
root@DietPi:~/here#./x
bash: ./x: cannot execute: required file not found

Try building your app as 64-bit instead.

ok, got further. My test app which only has 1 window and 1 function (exit) works.

My main app I get this error:

(test2:1937): dbind-WARNING **: 20:43:57.645: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[GLib] ../../../glib/gmem.c:136: failed to allocate 4294967296 bytes
Trace/breakpoint trap

Ok another update to the previous update above:

I did apt-get install at-spi2-core and now the error is only:

[GLib] ../../../glib/gmem.c:136: failed to allocate 4294967296 bytes
Trace/breakpoint trap

But I dont ask for 4GB allocation in my code…

Hi Alex,

I am not sure if this helps, and here are instructions on how to install the libraries for Xojo to run on Ubuntu:

…and here is a YouTube video to install Xojo on Ubuntu with a VirtualBox machine

that didnt do it.

So I can compile a empty GUI app that does nothing and it works. I guess I can start commenting code out to see what happens.

Ok, found the problem. I had a event handler called Open and this was in there. It was probably leftovers from a older version of Xojo. I found it when I created a dummy app and checked to see what is created by default. The below wasnt. Its removed and my code now works just fine. :slight_smile:

#if TargetLinux
const style=“GtkButton, GtkEntry, button, entry, .button, .entry " _
+”{padding:0px;margin:1px;margin-top:0px; min-height:14px;min-width:14px} " _
+“scrollbar.horizontal slider{min-height:8px} scrollbar.vertical slider(min-width:8px;}” _
+“progressbar trough{min-width:10px; min-height:10px;}”

const klibgtk = “libgtk-3”
declare Function gdk_display_get_default lib klibgtk () as ptr
declare Function gdk_display_get_default_screen lib klibgtk (display as ptr) as ptr
declare Function gtk_css_provider_new lib klibgtk () as ptr
declare Function gtk_css_provider_load_from_data lib klibgtk (obj as ptr,data as CString,length as uint32,error as ptr) as Boolean
declare sub gtk_style_context_add_provider_for_screen lib klibgtk (screen as ptr, provider as ptr, priority as int32)

dim screen as ptr=gdk_display_get_default_screen(gdk_display_get_default)
dim provider as ptr=gtk_css_provider_new
call gtk_css_provider_load_from_data(provider,style,-1,nil)
gtk_style_context_add_provider_for_screen(screen,provider,900)
#endif