1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #31 (closed defect: fixed)

Opened 3 years ago

Last modified 20 months ago

Trunk won't start in kubuntu 10.04: "undefined symbol: ftdi_init"

Reported by: kevin-deldycke Owned by: hjunnila
Priority: major Component: Plugin: Enttec DMX USB Output
Version: SVN REVISION (specify) Keywords:
Cc:

Description

I've just compiled trunk r1664 of QLC under kubuntu 10.04 LTS.

I've followed all instructions from the wiki. I even contributed to that page to tell people to install the missing libftdi-dev library. QLC compiled without errors.

But when I try to launch QLC, here is the error I get:

kevin@kev-laptop:~$ qlc

Q Light Controller Version 3.0.6
This program is licensed under the terms of the GNU General Public License v2.
Copyright (c) Heikki Junnila (hjunnila@users.sf.net).

Unable to find translation for "en_US"
Found an output plugin: "Dummy Output"
Found an output plugin: "DMX4Linux Output"
qlc: symbol lookup error: /usr/lib/qlc/output/libenttecdmxusbout.so: undefined symbol: ftdi_init
kevin@kev-laptop:~$

FYI, kubuntu uses libftdi-dev v0.17.

Attachments

qlc-trunk-r1664-kubuntu-10-04-kucid-compile-trace.txt (183.8 KB) - added by kevin-deldycke 3 years ago.
QLC trunk r1664 compiling log in kubuntu 10.04 LTS Lucid
qlc-trunk-r1668-kubuntu-10-04-kucid-compile-trace.txt (223.6 KB) - added by kevin-deldycke 3 years ago.
QLC trunk r1668 compiling log in kubuntu 10.04 LTS Lucid
ftditest.tar.gz (481 bytes) - added by hjunnila 3 years ago.
Simple code to test ftdi_init().

Change History

Changed 3 years ago by kevin-deldycke

QLC trunk r1664 compiling log in kubuntu 10.04 LTS Lucid

  Changed 3 years ago by kevin-deldycke

BTW, I get the same error when I try the tagged version of QLC 3.0.5.

follow-up: ↓ 3   Changed 3 years ago by chris_staite

  • owner changed from chris_staite to hjunnila
  • priority changed from critical to major
  • status changed from new to assigned

Can you install/run from the deb? If so, does it pull in any different dependancies? Just trying to figure out if the version of libftdi has changed.

I've not got a test system running Ubuntu, so have re-assigned to Heikki.

in reply to: ↑ 2   Changed 3 years ago by kevin-deldycke

Replying to chris_staite:

Can you install/run from the deb? If so, does it pull in any different dependancies? Just trying to figure out if the version of libftdi has changed.

Unfortunately I can't install the debs as I'm using a x86_64 flavour of kubuntu:

kevin@kev-laptop:~/Desktop/qlc-debs$ ls -lah
total 1.2M
drwxr-xr-x  2 kevin kevin 4.0K 2010-08-30 15:13 ./
drwxr-xr-x 14 kevin kevin 4.0K 2010-08-30 15:13 ../
-rw-r--r--  1 kevin kevin 1.1M 2010-08-30 15:13 qlc_3.0.6_i386.deb
-rw-r--r--  1 kevin kevin  33K 2010-08-30 15:12 qlc-input-midi_3.0.6_i386.deb
-rw-r--r--  1 kevin kevin  25K 2010-08-30 15:13 qlc-output-enttec-dmxusb_3.0.6_i386.deb
kevin@kev-laptop:~/Desktop/qlc-debs$ sudo dpkg -i ./*.deb
[sudo] password for kevin: 
dpkg: error processing ./qlc_3.0.6_i386.deb (--install):
 package architecture (i386) does not match system (amd64)
dpkg: error processing ./qlc-input-midi_3.0.6_i386.deb (--install):
 package architecture (i386) does not match system (amd64)
dpkg: error processing ./qlc-output-enttec-dmxusb_3.0.6_i386.deb (--install):
 package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
 ./qlc_3.0.6_i386.deb
 ./qlc-input-midi_3.0.6_i386.deb
 ./qlc-output-enttec-dmxusb_3.0.6_i386.deb
kevin@kev-laptop:~/Desktop/qlc-debs$ 

:(

  Changed 3 years ago by hjunnila

Sounds to me that the real problem lies in libftdi, not qlc. Have you tried compiling libftdi yourself? Or maybe some link towards libftdi.so is missing? Usually the compiler/linker uses one filename, while the run-time library loader (whachamacallit) tries to find another.

  Changed 3 years ago by kevin-deldycke

Just tried to install the latest libftdi-dev 0.18-1 from the upcoming kubuntu 10.10 (Maverick):

kevin@kev-laptop:~/Desktop$ wget http://fr.archive.ubuntu.com/ubuntu/pool/main/libf/libftdi/libftdi1_0.18-1_amd64.deb
kevin@kev-laptop:~/Desktop$ wget http://fr.archive.ubuntu.com/ubuntu/pool/main/libf/libftdi/libftdi-dev_0.18-1_amd64.deb
$ sudo dpkg -i libftdi1_0.18-1_amd64.deb libftdi-dev_0.18-1_amd64.deb
[sudo] password for kevin:
(Reading database ... 115255 files and directories currently installed.)
Preparing to replace libftdi1 0.17-1 (using libftdi1_0.18-1_amd64.deb) ...
Unpacking replacement libftdi1 ...
Preparing to replace libftdi-dev 0.17-1 (using libftdi-dev_0.18-1_amd64.deb) ...
Unpacking replacement libftdi-dev ...
Setting up libftdi1 (0.18-1) ...

Setting up libftdi-dev (0.18-1) ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
kevin@kev-laptop:~/Desktop$

Then I tried to rebuild QLC trunk (r1667 this time) but I still get the same undefined symbol: ftdi_init error.

  Changed 3 years ago by hjunnila

I am unable to reproduce this. I just recently installed Ubuntu 10.04.1 LTS on an amd64 laptop (crappy Packard Bell EasyNote? SJ51), with libftdi-0.17-1. Compiled QLC trunk (r1668) with "dpkg-buildpackage -rfakeroot -I.svn" and everything looks OK. I can run QLC and the Enttec plugin works just fine, although I have to manually do "sudo rmmod ftdi_sio" after plugging the dongle, before launching qlc, or otherwise selecting the plugin in the patch dialog ends up in a lockup situation.

  Changed 3 years ago by kevin-deldycke

I didn't know the dpkg-buildpackage -rfakeroot -I.svn command. Instead I used the following procedure (as you can see in my first log):

qmake-qt4
make
sudo make install

So I just tried the dpkg-buildpackage on a fresh QLC (r1668).

As expected, this command created a set of deb packages for the amd64 architecture:

kevin@kev-laptop:~/Desktop$ ls -lah *.deb
-rw-r--r-- 1 kevin kevin 1.2M 2010-09-04 12:24 qlc_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  29K 2010-09-04 12:24 qlc-input-enttec-wing_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  38K 2010-09-04 12:24 qlc-input-hid_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  34K 2010-09-04 12:24 qlc-input-midi_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin 9.7K 2010-09-04 12:24 qlc-output-dmx4linux_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  26K 2010-09-04 12:24 qlc-output-enttec-dmxusb_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  28K 2010-09-04 12:24 qlc-output-midi_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  16K 2010-09-04 12:24 qlc-output-peperoni_3.0.6_amd64.deb
-rw-r--r-- 1 kevin kevin  14K 2010-09-04 12:24 qlc-output-udmx_3.0.6_amd64.deb
kevin@kev-laptop:~/Desktop$ 

I tried to install them:

kevin@kev-laptop:~/Desktop$ sudo dpkg -i ./*.deb
[sudo] password for kevin:
Selecting previously deselected package qlc.
(Reading database ... 137750 files and directories currently installed.)
Unpacking qlc (from ./qlc_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-input-enttec-wing.
Unpacking qlc-input-enttec-wing (from .../qlc-input-enttec-wing_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-input-hid.
Unpacking qlc-input-hid (from .../qlc-input-hid_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-input-midi.
Unpacking qlc-input-midi (from .../qlc-input-midi_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-output-dmx4linux.
Unpacking qlc-output-dmx4linux (from .../qlc-output-dmx4linux_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-output-enttec-dmxusb.
Unpacking qlc-output-enttec-dmxusb (from .../qlc-output-enttec-dmxusb_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-output-midi.
Unpacking qlc-output-midi (from .../qlc-output-midi_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-output-peperoni.
Unpacking qlc-output-peperoni (from .../qlc-output-peperoni_3.0.6_amd64.deb) ...
Selecting previously deselected package qlc-output-udmx.
Unpacking qlc-output-udmx (from .../qlc-output-udmx_3.0.6_amd64.deb) ...
dpkg: dependency problems prevent configuration of qlc:
 qlc depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-input-enttec-wing:
 qlc-input-enttec-wing depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-input-enttec-wing depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-input-enttec-wing (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-input-hid:
 qlc-input-hid depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-input-hid depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-input-hid (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-input-midi:
 qlc-input-midi depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-input-midi depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-input-midi (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-output-dmx4linux:
 qlc-output-dmx4linux depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-output-dmx4linux depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-output-dmx4linux (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-output-enttec-dmxusb:
 qlc-output-enttec-dmxusb depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-output-enttec-dmxusb depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-output-enttec-dmxusb (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-output-midi:
 qlc-output-midi depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-output-midi depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-output-midi (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-output-peperoni:
 qlc-output-peperoni depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-output-peperoni depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-output-peperoni (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qlc-output-udmx:
 qlc-output-udmx depends on libqt4-core (>= 4.6.0); however:
  Package libqt4-core is not installed.
 qlc-output-udmx depends on libqt4-gui (>= 4.6.0); however:
  Package libqt4-gui is not installed.
dpkg: error processing qlc-output-udmx (--install):
 dependency problems - leaving unconfigured
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'

Unknown media type in type 'all/allfiles'

Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

Unknown media type in type 'fonts/package'

Unknown media type in type 'interface/x-winamp-skin'

Errors were encountered while processing:
 qlc
 qlc-input-enttec-wing
 qlc-input-hid
 qlc-input-midi
 qlc-output-dmx4linux
 qlc-output-enttec-dmxusb
 qlc-output-midi
 qlc-output-peperoni
 qlc-output-udmx
kevin@kev-laptop:~/Desktop$

Given the dpkg error, I installed the missing packages:

aptitude install libqt4-gui libqt4-core

and tried to reinstall the debs, but got the exact same ftdi_init error as before... :(

Changed 3 years ago by kevin-deldycke

QLC trunk r1668 compiling log in kubuntu 10.04 LTS Lucid

  Changed 3 years ago by hjunnila

Sounds to me that there is probably something wrong with your environment. Please try with a stock ubuntu (non-KDE). I had to do absolutely nothing special for this machine.

Also, try the attached test code (I'm uploading it as an attachment here soon). There are two variations in the sources, just replace "#if 1" with "#if 0", recompile and run again.

Changed 3 years ago by hjunnila

Simple code to test ftdi_init().

  Changed 3 years ago by kevin-deldycke

  • status changed from assigned to closed
  • resolution set to worksforme

I just tried to recompile the r1668 version of the trunk as I did in comment:7 and... QLC compiles and runs without any problem ! :(

I'm puzzled.

I suspected that the issue was solved silently last week when I installed some other debs. So I reverted all changes I made on my system since my last comment, but I still can't reproduce the undefined symbol: ftdi_init error.

So let's mark this bug as "works for me".

  Changed 20 months ago by kevin-deldycke

  • status changed from closed to reopened
  • resolution worksforme deleted

Just tried to compile QLC for the first time on my new Kubuntu 11.04 and guess what ? Had the exact same issue again:

root@kevin-laptop:/home/kevin/Desktop/qlc-trunk# qlc

Q Light Controller Version 3.2.0-1-r2472
This program is licensed under the terms of the GNU General Public License v2.
Copyright (c) Heikki Junnila (hjunnila@users.sf.net).

Output plugin "DMX4Linux Output" from "libdmx4linuxout.so" 
Output plugin "Enttec DMX USB Output" from "libenttecdmxusbout.so" 
qlc: symbol lookup error: /usr/lib/qt4/plugins/qlc/output/libenttecdmxusbout.so: undefined symbol: ftdi_init

This time I tried a few new tricks to fix the issue, like modifying the variables.pri file:

root@kevin-laptop:/home/kevin/Desktop/qlc-trunk# svn diff
Index: variables.pri
===================================================================
--- variables.pri       (revision 2472)
+++ variables.pri       (working copy)
@@ -10,7 +10,7 @@
 # Compiler & linker configuration
 #############################################################################
 
-QMAKE_CXXFLAGS += -Werror
+QMAKE_CXXFLAGS += -Werror -L/usr/include $$system(libftdi-config --cflags) $$system(libftdi-config --libs) 
 CONFIG         += warn_on
 macx:CONFIG    -= app_bundle # Let QLC construct the .app bundle
 

Or adding a configuration file to /etc/ld.so.conf.d:

root@kevin-laptop:~# echo "
/usr/lib
/usr/include
" > /etc/ld.so.conf.d/libftdi.conf 
root@kevin-laptop:~# ldconfig

But none of these are working. I always get the same error. I still don't know how the issue automagiccaly fixed itself last time. But there must be something wrong with Kubuntu or the way I compile QLC from its sources. BTW, here is the script I use to compile it:

rm -rf /usr/bin/qlc*
rm -rf /usr/lib/libqlc*
rm -rf /usr/lib/libqlc*
rm -rf /usr/share/mime/packages/qlc*
rm -rf /usr/share/qlc*
rm -rf /usr/share/applications/qlc*
rm -rf /usr/share/pixmaps/qlc*
apt-get update
apt-get install g++ make libqt4-dev qt4-dev-tools libasound2-dev libusb-dev subversion debhelper fakeroot libftdi-dev
rm -rf ./qlc-trunk
svn co https://qlc.svn.sf.net/svnroot/qlc/trunk qlc-trunk
cd qlc-trunk
qmake-qt4
make
make install

Will try other stuff this week as I need QLC running for a show next month.

  Changed 20 months ago by kevin-deldycke

  • status changed from reopened to closed
  • resolution set to fixed

Just tried to compile your simple ftditest.tar.gz example:

$ mkdir ftdi-test
$ cd ftdi-test/
$ wget https://sourceforge.net/apps/trac/qlc/raw-attachment/ticket/31/ftditest.tar.gz
$ tar xvzf ./ftditest.tar.gz
$ cd ftditest

Here is the detail of the compilation itself:

root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# qmake-qt4
sh: pkg-config: not found
sh: pkg-config: not found
sh: pkg-config: not found
root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o ftditest.o ftditest.cpp
g++ -Wl,-O1 -o ftditest ftditest.o    -L/usr/lib -lQtGui -lQtCore -lpthread
ftditest.o: In function `main':
ftditest.cpp:(.text+0x20): undefined reference to `ftdi_init'
ftditest.cpp:(.text+0x28): undefined reference to `ftdi_deinit'
collect2: ld returned 1 exit status
make: *** [ftditest] Error 1
root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest#

And you know what ? Installing pkg-config fixed the problem ! :)

root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# cd ..
root@kevin-laptop:/home/kevin/Desktop/ftdi-test# rm -rf ./ftditest
root@kevin-laptop:/home/kevin/Desktop/ftdi-test# apt-get install pkg-config
(...)
root@kevin-laptop:/home/kevin/Desktop/ftdi-test# tar xvzf ./ftditest.tar.gz 
ftditest/
ftditest/ftditest.pro
ftditest/ftditest.cpp
root@kevin-laptop:/home/kevin/Desktop/ftdi-test# cd ftditest
root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# qmake-qt4 
root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o ftditest.o ftditest.cpp
g++ -Wl,-O1 -o ftditest ftditest.o    -L/usr/lib -lftdi -lQtGui -lQtCore -lpthread 
root@kevin-laptop:/home/kevin/Desktop/ftdi-test/ftditest# 

I've updated the InstallationSubversionLinux wiki page accordingly.

Note: See TracTickets for help on using tickets.