FrontPanel 5.3.0 and Fedora Linux

Hello Opal Kelly,

This is about how to make FrontPanel 5.3.0 work under Fedora Linux. Hope it helps.

After downloading and installing FrontPanel, FrontPanel fails to start with the following error message:

/usr/local/bin/FrontPanel.bin: error while loading shared libraries: liblua5.3.so.0: cannot open shared object file: No such file or directory

Download lua-5.3.0 and install lua-5.3.0 with the following root command to compile and install the shared library in addition to the static library:

tar zxvf lua-5.3.0.tar.gz; cd lua-5.3.0; patch -p1 < …/lua-5.3.0.diff; make linux; make linux install INSTALL_TOP=/usr/local/lua-5.3.0; cd /usr/local/lua-5.3.0/lib; ln -s liblua.so liblua5.3.so.0; echo /usr/local/lua-5.3.0/lib >> /etc/ld.so.conf; ldconfig;

New users can not upload attachments, so here comes lua-5.3.0.diff:

diff -Naur lua-5.3.0/Makefile lua-5.3.0.patched/Makefile
--- lua-5.3.0/Makefile	2014-10-30 00:14:41.000000000 +0100
+++ lua-5.3.0.patched/Makefile	2023-12-22 11:06:38.600311066 +0100
@@ -41,7 +41,7 @@
 # What to install.
 TO_BIN= lua luac
 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so
 TO_MAN= lua.1 luac.1
 
 # Lua version and release.
diff -Naur lua-5.3.0/src/liblua.so.ld lua-5.3.0.patched/src/liblua.so.ld
--- lua-5.3.0/src/liblua.so.ld	1970-01-01 01:00:00.000000000 +0100
+++ lua-5.3.0.patched/src/liblua.so.ld	2023-12-22 11:19:21.550248752 +0100
@@ -0,0 +1,4 @@
+LUA_5.3 {
+    global:
+    *;
+};
diff -Naur lua-5.3.0/src/Makefile lua-5.3.0.patched/src/Makefile
--- lua-5.3.0/src/Makefile	2015-01-05 17:04:52.000000000 +0100
+++ lua-5.3.0.patched/src/Makefile	2023-12-22 11:21:25.034807342 +0100
@@ -19,7 +19,7 @@
 SYSLDFLAGS=
 SYSLIBS=
 
-MYCFLAGS=
+MYCFLAGS=-fPIC
 MYLDFLAGS=
 MYLIBS=
 MYOBJS=
@@ -29,6 +29,7 @@
 PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
 
 LUA_A=	liblua.a
+LUA_SO=	liblua.so
 CORE_O=	lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
 	lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
 	ltm.o lundump.o lvm.o lzio.o
@@ -43,8 +44,9 @@
 LUAC_O=	luac.o
 
 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) ${LUA_SO} $(LUA_T) $(LUAC_T)
 ALL_A= $(LUA_A)
+ALL_SO=${LUA_SO}
 
 # Targets start here.
 default: $(PLAT)
@@ -55,10 +57,15 @@
 
 a:	$(ALL_A)
 
+so:	${ALL_SO}
+
 $(LUA_A): $(BASE_O)
 	$(AR) $@ $(BASE_O)
 	$(RANLIB) $@
 
+${LUA_SO}:
+	gcc -Wl,--version-script=liblua.so.ld -shared ${BASE_O} -o ${LUA_SO}
+
 $(LUA_T): $(LUA_O) $(LUA_A)
 	$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
 

Please see here for the FrontPanel OS support matrix:

I hope that you can safely add one distribution to that list after this, but I do have a problem reproducing the results from the Getting Started (Getting Started - Opal Kelly Documentation Portal) Section 4.2.

The configuration file (share/FrontPanel/bitfiles/XEM8310-AU25P/flashloader.bit) was uploaded with the message: FPGA configuration complete (386 milliseconds).
The profile file (Samples/First/First.xfp) was uploaded with the message: FrontPanel profile loaded successfully.

But then, the panel does not correspond to the panel from the guide. Again, I can not show you because you disabled attachments for new users. The numbers on the okToggleButtons are missing, the okLEDs do not light up. The SUM field says 0000.

I do get some GTK warnings:

(FrontPanel.bin:780625): Gtk-WARNING **: 09:24:14.702: Negative content width -14 (allocation 20, extents 17x17) while allocating gadget (node button, owner GtkToggleButton)

But nothing on ‘journalctl --boot --follow’ and the serial number, firmware version, voltage and temperature statistics appear to function as well.

This is my very first experience with FPGAs. Your help would be appreciated.

Best regards,
Mischa Baars.

It seems I have not been reading the Getting Started Guide careful enough. After downloading the precompiled bit-files from the website, and uploading first.bit, instead of flashloader.bit, I now have a working SUM field and four functioning red LEDs on the XEM8310 board.

The green okLEDs in the panel still don’t do anything and the okToggleButton digits are still missing, but it’s a start.

Except from the minor issue with lua-5.3.0, I think it’s safe to say that Fedora Linux (38) can safely be used with the XEM8310 (/ BRK8310).