Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
2
answers
3511
views
libcairo undefined symbol: FT_Get_Var_Design_Coordinates error when calling R from compiled MATLAB application on Centos7
I'm posting this question to document the solution to a problem which had me stuck for several weeks for which no answer was found on StackExchange or discussion boards. (Answer forthcoming) I'm trying to run a compiled matlab program (MATLAB 2017a) compiled using the application compiler toolbox (M...
I'm posting this question to document the solution to a problem which had me stuck for several weeks for which no answer was found on StackExchange or discussion boards. (Answer forthcoming)
I'm trying to run a compiled matlab program (MATLAB 2017a) compiled using the application compiler toolbox (Matlab compiler 6.4) on a Centos7 operating system. The tricky part is that my Matlab program uses the "system" command to call R and knit an rmarkdown document.
To get standalone matlab programs to run on linux operating systems it is necessary to set LD_LIBRARY_PATH like thus:
export LD_LIBRARY_PATH={$LD_LIBRARY_PATH}:/usr/local/MATLAB/MATLAB_Runtimev92/v92/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtimev92/v92/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtimev92/v92/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtimev92/v92/sys/opengl/lib/glnxa64
The problem was, this broke R in the following way:
In grDevices::png(f) :
unable to load shared object '/usr/lib64/R/library/grDevices/libs//cairo.so':
/lib64/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates
Testing the R code independently I found it ran fine when run with sudo privileges. This didn't work because the MATLAB program wouldn't work when run with sudo privileges.
Turns out, sudo privileges clear LD_LIBRARY_PATH: https://unix.stackexchange.com/questions/171262/ld-library-path-always-blank-after-sudo
One workaround I found was to change my system call in MATLAB to call with sudo but its a sloppy fix since it requires the user to type their sudo password halfway through the program run. So I'm looking for a better fix.
Zachary Klamer
(41 rep)
Jan 8, 2021, 08:59 PM
• Last activity: May 29, 2025, 11:06 PM
1
votes
0
answers
420
views
Is possible to choose the PDF version output in pdftocairo?
Command `pdftocairo` is an utility from [poppler-utils][1] package. It's a PDF to PNG/JPEG/PDF/PS/EPS/SVG converter using [Cairo][2]. I use this command to update a very old PDF from version 1.2 to 1.5, for example: ```shell $ pdftocairo -pdf input.pdf output.pdf ``` The PDF version of the output PD...
Command
pdftocairo
is an utility from poppler-utils package. It's a PDF to PNG/JPEG/PDF/PS/EPS/SVG converter using Cairo . I use this command to update a very old PDF from version 1.2 to 1.5, for example:
$ pdftocairo -pdf input.pdf output.pdf
The PDF version of the output PDF in my system is always 1.5:
- Linux Mint 21.1
- poppler-utils 22.02.0-2ubuntu0.1
- cairo 1.16.0
Now, in **2025-01-13**, i am using **Debian Testing/Trixie**, and the PDF version of the output PDF in my system is always 1.7:
- Linux Debian Testing/Trixie
- poppler-utils 24.08.0-4
- cairo 1.21
Also, looking at Cairo Graphics Manual , there's an enum cairo_pdf_version_t
and maybe, pdftocairo is static and no one can change version. Maybe pdftcairo use one of those functions (CAIRO_PDF_VERSION_1_7
) and it can not be changed. With cairo 1.16 i got PDF 1.5, and Cairo 1.18 got PDF 1.7.
**My questions:**
**1)** Is possible to choose the PDF version output? Like 1.4, 1.5, 1.6 or 1.7?
**2)** There is ANY advantage in change PDF version?
> **PS.:** I have opened an issue in Gitlab's Poppler , but it was closed with comment "This is not a support forum." So harsh.
Daniel
(432 rep)
Jul 2, 2023, 12:57 PM
• Last activity: Jan 13, 2025, 02:23 PM
0
votes
0
answers
215
views
Passing Cario's dir to meson
While trying to build epiphany I received: > Run-time dependency cairo found: NO (tried pkgconfig and cmake) > meson.build:80:0: ERROR: Dependency "cairo" not found, tried pkgconfig and cmake Then I tried to pass cairo to it:`PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/p...
While trying to build epiphany I received:
> Run-time dependency cairo found: NO (tried pkgconfig and cmake)
> meson.build:80:0: ERROR: Dependency "cairo" not found, tried pkgconfig and cmake
Then I tried to pass cairo to it:
PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/ meson ..
The error messages persisted.
On another post I say someone suggesting to use setenv PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/ meson ..
However, setenv doesn't work on my terminal
The final part of meson.log.txt:
> Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
> Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (0.22)
Determining dependency 'iso-codes' with pkg-config executable '/usr/bin/pkg-config'
> env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
Called /usr/bin/pkg-config --modversion iso-codes
-> 0
3.12.1
> env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
Called /usr/bin/pkg-config --cflags iso-codes
-> 0
> env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
Called /usr/bin/pkg-config --libs iso-codes
-> 0
> env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
Called /usr/bin/pkg-config --libs iso-codes
-> 0
> Run-time dependency iso-codes found: YES 3.12.1
env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
Called /usr/bin/pkg-config --variable=prefix iso-codes
-> 0
/usr
Got pkgconfig variable prefix : /usr
Pkg-config binary for 1 is cached.
Determining dependency 'cairo' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: /media/34GB/Arquivos-de-Programas-Linux/Cairo-1.10.0/lib/pkgconfig/
Called /usr/bin/pkg-config --modversion cairo
-> 1
> CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/local/bin/cmake (3.19.2)
Extracting basic cmake information
CMake Toolchain: Calling CMake once to generate the compiler state
Calling CMake (['/usr/local/bin/cmake']) in /media/34GB/Arquivos-de-Programas-Linux/meson-private/__CMake_compiler_info__ with:
> - "--trace-expand"
> - "--trace-format=json-v1"
> - "--no-warn-unused-cli"
> - "--trace-redirect=cmake_trace.txt"
> - "-G"
> - "Ninja"
> - "-DCMAKE_TOOLCHAIN_FILE=/media/34GB/Arquivos-de-Programas-Linux/meson-private/__CMake_compiler_info__/CMakeMesonTempToolchainFile.cmake"
> - "."
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Try CMake generator: auto
Calling CMake (['/usr/local/bin/cmake']) in /media/34GB/Arquivos-de-Programas-Linux/meson-private/cmake_cairo with:
> - "--trace-expand"
> - "--trace-format=json-v1"
> - "--no-warn-unused-cli"
> - "--trace-redirect=cmake_trace.txt"
> - "-DCMAKE_TOOLCHAIN_FILE=/media/34GB/Arquivos-de-Programas-Linux/meson-private/cmake_cairo/CMakeMesonToolchainFile.cmake"
> - "."
> -- Module search paths: ['/', '/media/34GB/Arquivos-de-Programas-Linux/Cmake-3.19.2-Linux-x86_64', '/opt', '/usr', '/usr/local']
> -- CMake root: /media/34GB/Arquivos-de-Programas-Linux/Cmake-3.19.2-Linux-x86_64/share/cmake-3.19
> -- CMake architectures: []
> -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share']
Preliminary CMake check failed. Aborting.
Run-time dependency cairo found: NO (tried pkgconfig and cmake)
> meson.build:80:0: ERROR: Dependency "cairo" not found, tried pkgconfig and cmake
I have no idea why pkg-config is not finding it. Yet, cmake is not looking into Cairo's dir, since I didn't pass anything to it. probably there is a way to so. The problem is thatit is being called indirectly by meson.
user2752471
(265 rep)
Apr 18, 2023, 11:12 PM
1
votes
1
answers
1033
views
C++ linking error: 'libcairo.so: undefined reference to FT_Get_Var_Blend_Coordinates'
I'm trying to build a C++ project via CLion and have been unable to get past this error in the linking process: ```/lib/../lib64/libcairo.so: undefined reference to `FT_Get_Var_Blend_Coordinates'``` I'm wondering if anyone knows what the source of this issue could be - I've found a few similar quest...
I'm trying to build a C++ project via CLion and have been unable to get past this error in the linking process:
/lib/../lib64/libcairo.so: undefined reference to `FT_Get_Var_Blend_Coordinates'
I'm wondering if anyone knows what the source of this issue could be - I've found a few similar questions in forums that were solved by the removal of a problematic package, but I have none of the aforementioned packages installed.
The version of cairo is cairo-1.15.12-4.el7.x86_64
ap84
(13 rep)
Jul 23, 2020, 01:50 AM
• Last activity: Jul 23, 2020, 07:02 AM
1
votes
1
answers
258
views
cairo graphics inside my_conky.lua is eating memory when I use surface_create_from_png
I tried adding images to my `conky.lua` with the following function function drawimage(cr,img) image = cairo_image_surface_create_from_png (img) cairo_set_source_surface (cr, image, screen.x, screen.y) cairo_paint (cr) cairo_surface_destroy (image) end After starting `conky` my pc took a few minutes...
I tried adding images to my
conky.lua
with the following function
function drawimage(cr,img)
image = cairo_image_surface_create_from_png (img)
cairo_set_source_surface (cr, image, screen.x, screen.y)
cairo_paint (cr)
cairo_surface_destroy (image)
end
After starting conky
my pc took a few minutes to get frozen. After a reboot, I realized that cairo_image_surface_create_from_png()
function that eats my ram memory.
How can I prevent that, if possible?
Yunus
(1732 rep)
Mar 7, 2019, 07:17 PM
• Last activity: Jun 10, 2019, 03:32 PM
Showing page 1 of 5 total questions