libTogl undefined references - gcc

I am trying to install netgen (build from source).
Therefore Togl is needed and I installed it via
sudo apt-get install libtogl1 libtogl-dev
When typing 'make' I receive the following error messages:
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tk_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tkStubsPtr'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tcl_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tclStubsPtr'
Maybe Togl was not installed right. Is this an 32bit 64bit issu?
What should I do to fix this?

This is an issue with linking to the correct versions of Tcl and Tk, as #keltar mentioned. If your goal is to build Netgen from source, your best bet is to stick with netgen-5.3.1, which works with tcl8.5 and tk8.5.
I ran into this issue because when I ran sudo apt-get install tcl-dev tk-dev, apt-get fetched tcl8.6 and tk8.6 for me. (If you search online for these issues you can see that these linking issues can sometimes be resolved by updating your Tcl/Tk version.) I uninstalled the default tcl-dev and tk-dev packages and installed tcl8.5-dev and tk8.5-dev instead.
Once you have the best fit version of Tcl/Tk, you can install Netgen from source. For example,
./configure --with-tclconfig=/usr/lib/tcl8.5/ --with-tkconfig=/usr/lib/tk8.5/
make
make install

Related

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

Installing specific versions of pyproj from github

I have been trying to install obspy and have been running into a lot of problems. I want to install obspy which has a dependency on pyproj. But apparently obspy only works with pyproj 1.9.5.1, which I tried installing using pip (pip3 install pyproj==1.9.5.1), but only got the errors like-
_proj.c:7488:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
Digging deeper I found that it might be a Cython problem, and installing pyproj directly from github might help, because it would apparently make Cython recompile all the necessary files. Something along the lines of -
pip3 install git+https://github.com/jswhit/pyproj.git
However this one gives the error -
ERROR: Minimum supported proj version is 6.2.0, installed version is 5.2.0.
I di try installing a higher version of libproj-dev (sudo apt install libproj-dev=6.2.0) however it shows that there is no candidate for 6.2.0. I tried downloading the deb file and installing from that using -
sudo apt-get install ~/Downloads/libproj-dev_6.2.0-1_amd64.deb
which just leads to the error -
The following packages have unmet dependencies:
libproj-dev : Depends: libproj15 (= 6.2.0-1) but it is not installable
E: Unable to correct problems, you have held broken packages.
But I think this is not the right way to install for me anyway, since I need a specific version. Hence I tried installing directly from the tarball of the release -
pip3 install https://github.com/pyproj4/pyproj/archive/v1.9.5.1rel.tar.gz
Which leads to the first error I had, evidently due to Cython.
With errors on everything I tried to do to fix this, I am not sure what even is relevant to my problem now.
Any help is appreciated, and if this site is not the correct place for this question, please help me migrate it to its proper destination.
I am on Ubuntu 18.10.
The problem is, that Cython-generated c-files don't work for Python-3.7 if generated with Cython versions up to 0.27.3 (at least): The setup.py of pyproj (at least in the version 1.9.5.1) doesn't regenerate the_proj.c, which is generated with Cython 0.23.2 and thus the installation cannot succeed.
You have the following options:
stay on Python3.6 where everything works out of the box.
regenerate _proj.c with a current Cython-version.
For the second option:
download and unzip your prefered version from https://github.com/pyproj4/pyproj/releases/tag/v1.9.5.1rel and switch to the created folder pyproj-1.9.5.1rel.
check, that the cython-version is >=0.27.3. via cython --version.
regenerate the _proj.c file via cython -3 _proj.pyx (_proj.pyx looks like Python3-code, but also language_level=2 (i.e. cython -2 _proj.pyx) will probably work.
install running pip install .
pyproj 1.9.5.1 was release at Jan 7, 2016. At that time, the latest version Python was 3.5. In my tests. pyproj 1.9.5.1 failed to be installed on Python 3.7.4, but succeeded on Python 3.5.7.
You need to create a environment with Python 3.5 by pyenv or conda.
References
pyproj 1.9.5.1 release
Python release history

Why does this VLC Media Player Build Fail?

When building VLC on Ubuntu 18 using the following configure invocation:
First I obtain the source like so:
% git clone git://git.videolan.org/vlc.git
% cd vlc
% ./bootstrap
Then I build like so:
make clean
./configure --disable-lua --disable-swscale --disable-alsa --disable-chromecast --disable-fontconfig
The build fails like so:
codec/jpeg.c: In function ‘DecodeBlock’:
codec/jpeg.c:501:16: warning: variable ‘p_row_pointers’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
JSAMPARRAY p_row_pointers = NULL;
^~~~~~~~~~~~~~
CCLD libjpeg_plugin.la
CC codec/libsdl_image_plugin_la-sdl_image.lo
CCLD libsdl_image_plugin.la
CC codec/libxwd_plugin_la-xwd.lo
CCLD libxwd_plugin.la
CC codec/liblibass_plugin_la-libass.lo
CCLD liblibass_plugin.la
/usr/bin/ld: /root/vlc-3.0.4/contrib/x86_64-linux-gnu/lib/libfontconfig.a(fcxml.o): in function `FcConfigMessage':
/root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:573: undefined reference to `xmlSAX2GetLineNumber'
/usr/bin/ld: /root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:576: undefined reference to `xmlSAX2GetLineNumber'
/usr/bin/ld: /root/vlc-3.0.4/contrib/x86_64-linux-gnu/lib/libfontconfig.a(fcxml.o): in function `IA__FcConfigParseAndLoad':
/root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:3309: undefined reference to `xmlCreatePushParserCtxt'
/usr/bin/ld: /root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:3348: undefined reference to `xmlParseChunk'
/usr/bin/ld: /root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:3362: undefined reference to `xmlFreeParserCtxt'
/usr/bin/ld: /root/vlc-3.0.4/contrib/native/fontconfig/src/fcxml.c:3354: undefined reference to `xmlCtxtGetLastError'
Any ideas what I did wrong here? It seems like the module in question should fail to build in this case as I disabled fontconfig.
Libfontconfig is in fact installed:
root#fuzzbot:~/vlc-3.0.4# apt-get install libfontconfig
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libfontconfig1' instead of 'libfontconfig'
libfontconfig1 is already the newest version (2.13.0-5ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root#fuzzbot:~/vlc-3.0.4#
Additional ideas:
I tried in vain to find VLC's official bug tracker for this kind of thing. I found bug trackers for literally every subproject of VLC but the main project that I am trying to build. If anyone knows the proper channels to ask the VLC people about this, let me know.
Additionally if the admins feel that this question better fits on serverfault, or AskUbuntu, feel free to move it. As far as I can tell this is a little too automake specific to be serverfault's bag, and I don't think the issue is unique to Ubuntu, as the official VLC wiki specifies no specific instructions for Ubuntu.
I don't really need all the plugins for my use case. If doing any further --disables in my configure invocation will help, I'm willing to try it.
The errors indicates a problem with linking against "some" xml-library.
most likely libxml2, which you probably have not installed.
./configure is supposed to detect any missing library and prevent your build from failing, but there might be a bug in the configure script itself.
Anyhow, since you are on a Debian-based distribution, you could simply install all the packages that are required to build the official Debian (or Ubuntu) package. (Your personal build might have additional dependencies or lack some of the dependencies of the official package, but it is usually a good starting point).
apt-get build-dep vlc
If you are getting an error like E: You must put some 'source' URIs in your sources.list then you should add deb-src entries to your apt sources-list, e.g. using
find /etc/apt/sources.list /etc/apt/sources.list.d/ \
-type f -name "*.list" -not -name debsrc.list \
-exec echo sed -e 's|^deb |deb-src |' {} + > /etc/apt/sources.list.d/debsrc.list
I followed your post on vlc forum to this SO post.
As people there suggested the libass is the problem, thus I added the option to disable it. Now the configuration command looks like:
./configure --disable-libass \
--disable-lua --disable-swscale --disable-alsa --disable-chromecast --disable-fontconfig
The compilation proceeded without the previous fontconfig error. However it hits a different error:
....upnp....: undefined reference to `pthread_rwlock_wrlock'
A google search turned up another vlc forum thread. People suggesting turning off upnp. Configured it again by adding:
--disable-upnp
Then hit another error:
/libavcodec.a(fft.o): relocation R_X86_64_PC32 against symbol `ff_cos_32' can not be used when making a shared object; recompile with -fPIC
Another google search suggests to turn off chromaprint, adding yet another option:
--disable-chromaprint
Eventually it finishes with a success!
Before running the long configure command at the beginning of this post, I also tried building 3.0.7.1 but hit a problem with missing a liveMedia.hh file. In case anybody else is doing the same, here is the list of packages installed though not all of them are required since disabled a few features on the configure command line:
apt-get install git build-essential pkg-config libtool automake autopoint gettext
apt-get install subversion yasm cvs cmake ragel
apt-get install gperf
apt-get install openjdk-8-jre-headless openjdk-8-jdk-headless
apt-get install ant
apt-get install python3-pip
pip3 install meson
apt-get install nasm
apt-get install protobuf-c-compiler
apt-get install protobuf-compiler
apt-get install libpthread-stubs0-dev
apt-get install libasound2-dev liblivemedia-dev livemedia-utils
Summary
Use the videolan unix compile wiki page as a guide for steps below.
Install supporting packages as the list above shows.
Run cd contrib && mkdir native && cd native && ../bootstrap && make to build libraries.
Run the very long configure command:
./configure --disable-libass \
--disable-lua --disable-swscale --disable-alsa --disable-chromecast --disable-fontconfig \
--disable-upnp --disable-chromaprint
Run make.

Haskell Platform / Cabal - Installation of package 'haskell-gi' fails while linking due to 'undefined references'

Background
Currently, I'm working on a project that deals with Computer Vision.
I use ..
- Haskell as programming language.
- GTK+ for creating the GUI.
- FFmpeg to read and extract videos/frames from paths or the webcam.
- some algorithms for edge-detection.
I want to ..
- render videos (unmodified input video, aswell as the modified output video) to a drawingarea-widget that is part of the GTK-library.
My setup
- Windows 10 - 64 bit
- MSYS2 / Mingw32
- Haskell Platform (GHC 8.0.1)
- Cabal Version 1.24.0.0
- ffmpeg-light-0.12.0
- gtk-0.14.6
Problem
To render videos with GTK I need to install bindings for GI, so I tried to install the package 'haskell-gi' but it fails at linking-phase due to undefined references.
Example
After running cabal install haskell-gi i get:
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x19d8): undefined reference to `g_irepository_require'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x1f59): undefined reference to `g_typelib_symbol'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x26f3): undefined reference to `g_irepository_prepend_search_path'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x2bee): undefined reference to `g_base_info_gtype_get_type'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x2f2e): undefined reference to `g_irepository_find_by_name'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x42c7): undefined reference to `g_struct_info_get_field'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x460b): undefined reference to `g_struct_info_get_n_fields'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4775): undefined reference to `g_struct_info_get_size'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4aef): undefined reference to `g_union_info_get_field'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4e33): undefined reference to `g_union_info_get_n_fields'
C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3\dist\build/libHShaskell-gi-0.20.3-4ylmwt0eEVy4Aeczi0KBpN.a(LibGIRepository.o):fake:(.text+0x4f9d): undefined reference to `g_union_info_get_size'
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)
cabal: Leaving directory 'C:\Users\Roland\AppData\Local\Temp\cabal-tmp-1788\haskell-gi-0.20.3'
cabal: Error: some packages failed to install:
haskell-gi-0.20.3 failed during the building phase. The exception was:
ExitFailure 1
Note
This undefined references are methods which are defined in .c/.h-files which are part of GObjects' gobject-introspection folder.
What have I tried so far?
Whilst installing Gtk2Hs and ffmpeg-light I was facing similar problems but I was able to get rid off by ..
- downloading the development-source-files and adding --extra-include-dir or --extra-lib-dir tags to the cabal installation
- adding linker flags (pkg-config --libs gobject-introspection-1.0) to the cabal settings
- downloading missing libraries and adding them to the PATH
- modifying .pc files (that are part of the package-config)
None of the options above worked with 'haskell-gi'. I also searched SO for related things but that didn't work too.
Question
Does anyone of you have an idea how to get over this problem? Any help appreciated.
I don't know what the packages are called on Windows, but on Ubuntu I had to install the C libs/headers for GTK and GI separately with
sudo apt install libgirepository1.0-dev
sudo apt install libgtk-3-dev
since cabal (or in my case, stack) did not install these for me (though I got different error messages).
You don't say if you've already done this, but https://www.gtk.org/download/windows.php says you should
pacman -S mingw-w64-x86_64-gtk3
pacman -S mingw-w64-x86_64-toolchain base-devel
since you've already got MSYS.
It might be helpful if you can post your cabal settings or link to a repo.
(You might also find https://github.com/lettier/movie-monad useful to look at for your project.)

Agave dependency error

I am trying to install Agave under Fedora, but I got this error:
configure: error: gnome-doc-utils >= 0.3.2 not found
I tried to compile and install the gnome-doc-utils from this page, but i still got this error,and when i try the
yum list installed gnome-doc-utils*
command, I can't find the package. Do I have to register the package after installing? I don't think I have a error for the make install, because I don't see any the text error in the process, or I could be wrong.
In general, package managers (tools like yum) don't know that something has been installed on your machine unless it was installed as a package. If an agave package for Fedora exists, I would suggest using that instead of compiling from source.

Resources