I have two versions of Octave installed, version 3.6.4 installed via the package manager (Linux Mint Debian), and version 4.0.0 compiled from source. I also have numerous .oct files in a folder pointed to in an .octaverc file. My problem is that the version 4.0.0 cannot "see" these .oct files and if I try to call them the whole session crashes unless I recompile them under 4.0.0 with mkoctfile. However, doing this means that the version 3.6.4 cannot "see" them and trying to call them gives an error message
failed to load: liboctinterp.so.3: cannot open shared object file: No such file or directory
How can I get both versions to recognize my .oct functions without having to recompile them each time?
I copy the answer from Mike and Olaf from the help mailinglist (crossposting http://octave.1599824.n4.nabble.com/Oct-files-run-in-Octave-version-3-6-4-or-4-0-0-but-not-both-td4672690.html)
Short answer: you can't.
The Octave library API and ABI change between releases. Octave 3.6 was liboct{ave,interp}.so.1, Octave 3.8 was liboct{ave,interp}.so.2, and 4.0 is liboct{ave,interp}.so.3. These libraries are not forwards or backwards compatible.
You can compile your oct-files in two (or three?) different paths with the
wanted Octave version in the path.
If you want to install your files system-wide, a good candidate directory for the differently compiled oct-files seems to be
fullfile (OCTAVE_HOME (), "lib/octave/site/oct/", octave_config_info ("canonical_host_type"))
assuming OCTAVE_HOME () is different for each of your Octave versions. This directory seems to be in the path by default.
If not system-wide, you could check OCTAVE_VERSION () in your .octaverc and set the path differently for each version.
Related
I have freetype2 installed on my system but I am also trying to install it from source, as well.
My installed version is here: /usr/lib64/pkgconfig/freetype2.pc. That file is listed as version 20.0.14.
To compile another tool, namely fontconfig, I need freetype2 >= 21.0.15.
So I downloaded freetype2 from its source git repo.
The trouble I'm having is that repository doesn't list any version even close to 21.0.15+. All of the tags in that repository are listed as VER-2-6-2, VER-2-9, VER-2-9-1, etc. And the generated freetype.pc file which is created after compilation are also listed as 2.6.2, 2.9, 2.9.1, etc. The version number is not 21.0.15 or even 20.0.14, which my CentOS 7.6 already has.
What determines the listed version in the freetype.pc file? Where can I find the version of freetype that will create a .pc file of >= 21.0.15+? Any clarification would be greatly appreciated.
Apparently the reason is because I was building freetype using CMake. And in the CMakeLists.txt, it's defining a version based on the version of freetype.
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
# developer team.
So it's unsupported. That's why the version number doesn't match.
In reality, the version number actually comes from libtool. See this table. e.g. I was building 2.10.0 freetype, so the freetype.pc should have been written with a version of 23.0.17
And if you build using configure, instead of cmake, you can find that exact same version 23.0.17 listed as "23:0:17" in the builds/unix/configure.raw file.
I have installed the following
C:\MinGW
C:\msys
C:\GTK
But python searching for the files in site packages and throwing the error as:
OSError: cannot load library libcairo.so.2: error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library
This issue happening in installation of weasyprint packages.
Installing GTK+ didn't work for me.
I solved this problem using UniConverter2.0.
My environments is
Python 3.7
Windows 10 x64
Install uniconvertor-2.0rc4-win64_headless.msi,
Find the "dll" sub-directory under the UniConverter installation path.(In my case, C:\Program Files\UniConvertor-2.0rc4\dlls)
Add this "dll" path to the system path.
Close VSCode and reopen the project.
Try to run your code again.
Enjoy!
In my experience with this issue Windows 10 (64-bit) with Python 3.5.1, it can be either due to duplicate libraries in other directories seen by PATH that don't work or the libraries that you installed just aren't compatible with your OS/Python bit version.
I suggest installing an older version of GTK+ (I used 3.10.4) using the links provided in the WeasyPrint documentation instead and see if the error persists. I had the issue on a newer build of GTK+. The version of GTK+ installed with MSYS2 gave the same error.
Edit: I found the post where I found the previous version of GTK that I was using but it gave an annoying warning about the cairo version being unstable:
See this post.
Edit 2: To get rid of the cairo version stability warnings, I managed to get a newer version of Cairo using the GTK3-runtime-3.22.8 (Link to git downloads as per WeasyPrint docs)
Remember to uninstall all current GTK+ implementations first. You might get a warning saying that the version of cairo can cause issues but I haven't been able to locate a newer version of cairo that works in windows, let me know if you find one.
I have a problem connected to a version of the openmpi library. Recently I had installed the newest stable version of the openmpi (1.10.2) and one of the programs I use stopped working. There is an error message when I run it:
error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
Indeed, there is no such a file in my system. There is however a newer version of the library - libmpi.so.12 and libmpi.so.12.0.2. Other programs, which are using openmpi, work without any error, which proves that the library was installed correctly (at least I think so (: ).
Unfortunately, I don't know which version of the openmpi was used to compile the program. I don't have access to its source code, so I cannot compile it against the newer library. I noticed that I can make the program run if I copy the libmpi.so.12 to the file called libmpi.so.1
Therefore, I have two questions:
Is it reasonable to use the workaround I've found? I have some doubts, although the program appears to run well.
Is there a way to check which version of the openmpi library was used during a compilation?
Thanks in advance.
EDIT:
I use Linux Mint 17.3.
I am trying to build a program as most others available on linux:
configure, make, make install.
However when I try to configure it I get the following message:
checking for gtk-config... no
checking for GTK - version >= 1.2.0... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: error: Cannot find GTK: Is gtk-config in path?
I have got gtk 2.x on the host machine. And when I run which and locate on gtk-config I get nothing back. Since I have the source what patches can I apply to fix this?
You need to install the development files for GTK 1.2; the name of the package depends on your distribution.
I'd like to warn you, though, that GTK 1.2 was last released 15 years ago, in 2001, and hasn't been updated since — which also implies that the application you're trying to build is also hopelessly outdated.
GTK+ 2.0.0 was also released in 2001 and it's currently in deep maintenance mode (the latest version is 2.24.29 and was released in 2015); GTK+ 3.0.0 was released in 2011, and it's the currently developed version of the API.
You cannot really apply patches to compile an application written with the GTK 1.x API using any newer major versions of GTK+ (e.g. 2.x or 3.x); each time the major version of GTK is bumped, the API is changed in a non-compatible way. You would need to port the application to the new API.
Additionally, if an application depends on GTK 1.x it's also likely that it will depend on older versions of existing libraries; or deprecated ones. You will need to find all the dependencies and ensure that they can be installed in parallel with the ones you have installed in your system.
You could try using the compatibility wrappers developed by OpenSUSE team that try to emulate GTK1.2 by some wrappers and/or automatically patching source code to be compiled, to be able to use GTK2.0 instead.
Have a look at https://github.com/openSUSE/gtk1-compat - perhaps it may work for you. I didn't test it, however, myself.
I install the latest qt version from the official website http://www.qt.io/qt5-4/ successfully. I follow this tutorial http://sysads.co.uk/2014/05/install-qt-5-3-ubuntu-14-04 and install the qt 5.4 version. Besides, I have the Ubuntu repository version of qt 5.2.1 installed.
Now I want to make the default version of 5.4 due to a program can't work well in the old qt5 version. That is to say, when I start a program which need to use qt5 library the program will use the version 5.4 rather than the version qt 5.2. Though I have installed the version 5.4 and 5.2, the program still use qt 5.2 version.
I try to use qtchooser to choose the 5.4 version as the default option, however, the program installed in the system still use the qt 5.2 library.
I endeavor to modify the related files regarding qtchooser, nothing changes.
If the library version is not in some regular repository, I would strongly suggest not relying on the user to install it somehow from an "unofficial" install location. Or provide a package for the library version yourself to install alongside your application. But don't replace the system Qt version. That would be Bad®.
Instead, either compile your program with a specific rpath, or wrap your program in scripts that use something like LD_PRELOAD and/or LD_LIBRARY_PATH to load the library version you're shipping in your application package.
Both ways are clunky, and I would try to at least work around the Qt version bug if at all possible.
The latest Qt version (non-alpha) actually is Qt 5.5.
If you install it through the installer provided by Qt, you should change the default Qt version by editing/creating:
/etc/xdg/qtchooser/default.conf
which should contain first the bin directory, then the lib directory, for example:
/opt/Qt/5.5/gcc_64/bin
/opt/Qt/5.5/gcc_64/lib
At least this works for the qmake version. Otherwise you might need to change LD_LIBRARY_PATH as commented by rubenvb.