Showing posts with label make. Show all posts
Showing posts with label make. Show all posts

2024-09-27

current64 - xfce4-4.18

 

current64 - xfce4-4.18 

Xfce's dependency chain

https://docs.xfce.org/xfce/4.12/building

Try build xfce4-4.18

Changes in Dependencies
glib-2.0 >= 2.66
Same version for gmodule-2.0, gobject-2.0, gthread-2.0, gio-2.0 and gdbus
gtk >= 3.24
libcairo >= 1.16
gdk-pixbuf-2.0 >= 2.40
gobject-introspection >= 1.66

https://wiki.xfce.org/releng/4.18/roadmap#changes_in_dependencies

https://docs.xfce.org/xfce/building

tux@slitaz:~$ tazpkg -l | grep xfce

tux@slitaz:~$ tazpkg -l | grep xfce

elementary-xfce                    0.19              xfce
exo               		   4.18.0            xfce
garcon                             4.18.2            xfce
greybird                           3.23.3            xfce
libxfce4ui                         4.18.6            xfce
libxfce4util                       4.18.2            xfce
mousepad                           0.6.2             xfce
thunar                             4.18.11           xfce
thunar-archive-plugin              0.5.2             xfce
thunar-volman                      4.18.0            xfce
tumbler                            4.18.2            xfce
xfce4-appfinder                    4.18.1            xfce
xfce4-netload-plugin               1.4.1             xfce
xfce4-notifyd                      0.9.4             xfce
xfce4-panel                        4.18.6            xfce
xfce4-power-manager                4.18.4            xfce
xfce4-pulseaudio-plugin            0.4.8             xfce
xfce4-ristretto                    0.13.2            xfce
xfce4-screensaver                  4.18.3            xfce
xfce4-screenshooter                1.9.9             xfce
xfce4-session                      4.18.4            xfce
xfce4-settings                     4.18.6            xfce
xfce4-taskmanager                  1.5.7             xfce
xfce4-terminal                     1.1.3             xfce
xfce4-whiskermenu-plugin           2.7.3             xfce
xfconf                             4.18.3            xfce
xfdesktop                          4.18.1            xfce
xfwm4                              4.18.0            xfce
xfwm4-themes                       4.18.0            xfce

tux@slitaz:~$ tazpkg -l | grep xfce | wc -l
29

2024-09-22

current64 - Xfce's dependency chain

current64 - Xfce's dependency chain

 

7 cook libxfce4ui

10 cook libxfconf

13 cook libxfce4util

16 cook libxfce4util-dev


Xfce's dependency chain

The Xfce packages need to be built in a specific order.
If you don't follow this, compile options might not be available or the configure stage will abort because of missing dependencies.

xfce4-dev-tools (only required if you build from GIT)
libxfce4util
xfconf
libxfce4ui
garcon, exo
thunar
xfce4-panel, xfce4-settings, xfce4-session, xfdesktop, xfwm4, xfce4-appfinder, tumbler…

....

https://docs.xfce.org/xfce/4.12/building


https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/32#post-52806


2023-11-30

current - kernel pae-2

 kernel pae-2

kernel pae
Memory : 2961MB (384MB used)

I also note to build kernel pae :)

Kernel : Linux 5.4.41-slitaz (x86_64)

Memory : 15788MB (706MB used)

Date/Time : Thu Jul 8 12:35:44 2021

Processor		: 8x AMD Ryzen 7 5800H with Radeon Graphics
Memory		        : 2961MB (384MB used)
Operating System	: Slitaz GNU/Linux current

# free -m
              total        used        free      shared  buff/cache   available
Mem:           2891         355        1697         665         839        1784
Swap:          1445           0        1445

A PAE-enabled kernel should have more than 4GB RAM.

POSTED 31 MINUTES AGO #




current - Dynamic Loader

 

Dynamic Loader

Normally tazweb has been compiled with libsoup248 / libwebkit and to avoid clash with libsoup / webkitgtk (webkit2gtk soon), each have own path (/usr/libsoup248, /usr/libwebkit).
And tazweb have LD_LIBRARY_PATH to use it.

With this command tazweb run :
LD_LIBRARY_PATH=/usr/libsoup248:/usr/libwebkit tazweb

8.5.2.3. Configuring the Dynamic Loader

By default, the dynamic loader (/lib/ld-linux.so.2) searches through /usr/lib for dynamic libraries that are needed by programs as they are run. However, if there are libraries in directories other than /usr/lib, these need to be added to the /etc/ld.so.conf file in order for the dynamic loader to find them. Two directories that are commonly known to contain additional libraries are /usr/local/lib and /opt/lib, so add those directories to the dynamic loader's search path.
....

https://www.linuxfromscratch.org/lfs/view/11.2/chapter08/glibc.html#contents-glibc


https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/13#post-51793

2023-05-20

slitaz64 - kernel-huge


kernel-huge

kernel-huge (a fully-loaded SMP Linux kernel)
config-huge-5.15.94.x64
config-generic-5.15.94.x64

kernel-generic-5.15.94-x86_64-1.txz 2023-02-18 02:30 8.1M
kernel-huge-5.15.94-x86_64-1.txt 2023-02-18 02:27 636
kernel-huge-5.15.94-x86_64-1.txz 2023-02-18 02:27 12M

$ cat /proc/version
Linux version 5.15.94 (root@z-mp.slackware.lan) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP PREEMPT Fri Feb 17 18:59:35 CST 2023

$ cat kernel-huge-5.15.94-x86_64-1.txt
kernel-huge: kernel-huge (a fully-loaded SMP Linux kernel)
kernel-huge:
kernel-huge: This is a Linux kernel with built-in support for most disk
kernel-huge: controllers. If you're looking for a more stripped down kernel
kernel-huge: (this one contains everything but the kitchen sink ;-), then install
kernel-huge: the kernel-generic in the /boot directory along with an initrd to
kernel-huge: load support for your boot device and filesystem. For instructions
kernel-huge: on the initrd, see README.initrd in the /boot directory.
kernel-huge:
kernel-huge: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
kernel-huge:

$ tar tvf kernel-huge-5.15.94-x86_64-1.txz

drwxr-xr-x root/root         0 2023-02-18 01:26:56 ./
drwxr-xr-x root/root         0 2023-02-18 01:26:56 boot/
-rw-r--r-- root/root   6873737 2023-02-18 01:26:43 boot/System.map-huge-5.15.94
-rw-r--r-- root/root    239621 2023-02-17 21:58:05 boot/config-huge-5.15.94.x64
-rw-r--r-- root/root  11593312 2023-02-18 01:26:55 boot/vmlinuz-huge-5.15.94
drwxr-xr-x root/root         0 2023-02-18 01:26:56 install/
-rw-r--r-- root/root       336 2023-02-18 01:26:56 install/doinst.sh
-rw-r--r-- root/root      1095 2023-02-18 01:26:56 install/slack-desc

$ tar tvf kernel-generic-5.15.94-x86_64-1.txz
drwxr-xr-x root/root         0 2023-02-18 01:30:03 ./
drwxr-xr-x root/root         0 2023-02-18 01:30:03 boot/
-rw-r--r-- root/root   5107025 2023-02-18 01:29:55 boot/System.map-generic-5.15.94
-rw-r--r-- root/root    239652 2023-02-17 21:58:09 boot/config-generic-5.15.94.x64
-rw-r--r-- root/root   7779296 2023-02-18 01:30:02 boot/vmlinuz-generic-5.15.94
drwxr-xr-x root/root         0 2023-02-18 01:30:03 install/
-rw-r--r-- root/root       354 2023-02-18 01:30:03 install/doinst.sh
-rw-r--r-- root/root      1086 2023-02-18 01:30:03 install/slack-desc

 

https://forum.slitaz.org/topic/slitaz-x86_64-asus-m3400qa/page/4#post-51517 

2023-02-23

Slitaz64 - compiling and linking - toolchain

 

compiling and linking - toolchain

make clear, we are talking about the toolchain.

1.

/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

# tazpkg -sp crt1.o
Search result for package "crt1.o"
glibc-dev

# tazpkg -lf glibc-dev | grep crt[1in].o
/usr/lib64/Mcrt1.o
/usr/lib64/Scrt1.o
/usr/lib64/crt1.o
/usr/lib64/crti.o
/usr/lib64/crtn.o
/usr/lib64/gcrt1.o
/usr/lib64/grcrt1.o
/usr/lib64/rcrt1.o

2.

echo 'int main(){}' | gcc -xc -

> # echo 'int main() { return 0; }' > test.c
> # gcc -v -o test.o test.c

ensure that the basic functions (compiling and linking) of the toolchain are working as expected.
If everything is working correctly, there should be no errors,

3.

8.5.1. Installation of Glibc

Prepare Glibc for compilation:
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=3.2 \
--enable-stack-protector=strong \
--with-headers=/usr/include \
libc_cv_slibdir=/usr/lib

The meaning of the configure options:
[..]
libc_cv_slibdir=/usr/lib
This variable sets the correct library for all systems. We do not want lib64 to be used.

8.5.2.3. Configuring the Dynamic Loader
By default, the dynamic loader (/lib/ld-linux.so.2) searches through /usr/lib for dynamic libraries that are needed by programs as they are run. However, if there are libraries in directories other than /usr/lib, these need to be added to the /etc/ld.so.conf file in order for the dynamic loader to find them. 
Two directories that are commonly known to contain additional libraries are /usr/local/lib and /opt/lib, so add those directories to the dynamic loader's search path.

more details..
https://www.linuxfromscratch.org/lfs/view/11.2/chapter08/glibc.html#contents-glibc

https://www.linuxfromscratch.org/lfs/view/11.2/chapter05/glibc.html


https://forum.slitaz.org/topic/slitaz-future/page/18#post-51394 

2023-02-20

Slitaz64 - echo 'int main(){}' | gcc -xc -


echo 'int main(){}' | gcc -xc -

> # echo 'int main() { return 0; }' > test.c

> # gcc -v -o test.o test.c

> See `config.log' for more details

1. config.log
$ grep -A10 int config.log

| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3505: error: in `/home/slitaz/wok/xorg-xf86-video-amdgpu/source/xorg-xf86-video-amdgpu-22.0.0':
configure:3507: error: C compiler cannot create executables
See `config.log' for more details.

2. Installation of Glibc

Caution

At this point, it is imperative to stop and ensure that the basic functions (compiling and linking) of the new toolchain are working as expected. To perform a sanity check, run the following commands:

echo 'int main(){}' | gcc -xc -
readelf -l a.out | grep ld-linux

If everything is working correctly, there should be no errors, and the output of the last command will be of the form:

[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

Note that for 32-bit machines, the interpreter name will be /lib/ld-linux.so.2.

If the output is not shown as above or there was no output at all, then something is wrong. Investigate and retrace the steps to find out where the problem is and correct it. This issue must be resolved before continuing on.

Once all is well, clean up the test file:

rm -v a.out

https://www.linuxfromscratch.org/lfs/view/11.2/chapter05/glibc.html


https://forum.slitaz.org/topic/slitaz-future/page/18#post-51392

2023-02-16

slitaz64 - LIBRARY_PATH

 

LIBRARY_PATH
configure: error: C compiler cannot create executables

checking for x86_64-slitaz-linux-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/slitaz/wok/xorg-xf86-video-amdgpu/source/xorg-xf86-video-amdgpu-22.0.0':
configure: error: C compiler cannot create executables
See `config.log' for more details  -  Attachments  config.log  12.2 KB

slitaz-toolchain - isl version none

GNU C17 (SliTaz) version 8.2.0 (i486-slitaz-linux)
compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version none

$ echo 'int main() { return 0; }' > test.c

$ gcc -v -o test.o test.c

https://forum.slitaz.org/topic/slitaz-next-41485/page/2#post-49031

https://forum.slitaz.org/topic/update-kernel-1/page/3#post-48139 


1.
root@slitaz:~# gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)

2.
root@slitaz:~# echo 'int main() { return 0; }' > test.c

root@slitaz:~# gcc -v -o test.o test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1 -quiet -v test.c -quiet -dumpdir test.o- -dumpbase test.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccMbr0oH.s
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory

3.
root@slitaz:~# tazpkg -gi isl

root@slitaz:~# gcc -v -o test.o test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu

[..]

COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/collect2 -plugin /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cc74BPIu.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.o crt1.o crti.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtbegin.o -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0 -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../.. /tmp/ccvjJ66F.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

4.
root@slitaz:~# find /usr/ -name crt?.o

/usr/lib64/crt1.o
/usr/lib64/crti.o
/usr/lib64/crtn.o

root@slitaz:~# ln -s /usr/lib64/crt1.o /usr/lib/.
root@slitaz:~# ln -s /usr/lib64/crtl.o /usr/lib/.
root@slitaz:~# ln -s /usr/lib64/crti.o /usr/lib/.

root@slitaz:~# tazpkg -sp crt1.o

Search result for package "crt1.o"
===============================================================
glibc-dev
musl-libc-dev
===============================================================
2 packages

5.
root@slitaz:~# gcc -v -o test.o test.c

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1 -quiet -v test.c -quiet -dumpdir test.o- -dumpbase test.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccr2oPU8.s
GNU C17 (SliTaz) version 12.2.0 (x86_64-slitaz-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../x86_64-slitaz-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/include
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/include-fixed
/usr/include
End of search list.
GNU C17 (SliTaz) version 12.2.0 (x86_64-slitaz-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
Compiler executable checksum: 3a8d01156457c23734b0a8c87475536a
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
as -v --64 -o /tmp/cc1rbU3x.o /tmp/ccr2oPU8.s
GNU assembler version 2.39 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.39
COMPILER_PATH=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/collect2 -plugin /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccqlrHHN.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crt1.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtbegin.o -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0 -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../.. /tmp/cc1rbU3x.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'

6.
root@slitaz:~# file test.o

test.o: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped
root@slitaz:~#

Attachments

  1. config.log  12.2 KB

 

https://forum.slitaz.org/topic/slitaz-future/page/18#post-51386

 

2023-02-06

2022-06-27

slitaz-41 -- slim-cmake-lpthreads


slitaz-41 -- slim-cmake-lpthreads 

Building error using cmake: cannot find -lpthreads

Hint: search for the actual error message

The one for "-lpthreads" just accidentally happened to be the last one in the log...


Solution: go through the log from the top, identify the section with the configure checks, find the last configure check prior to the point, where CMake identifies failure and dumps its logs. You might also try so search for the text "Configuring incomplete, errors occurred!"



I fight with slim :/.

Issue with cmake build :

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for one of the modules 'fontconfig'
CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890 (message):
None of the required 'fontconfig' found
Call Stack (most recent call first):
cmake/modules/FONTCONFIGConfig.cmake:18 (pkg_search_module)
CMakeLists.txt:108 (find_package)

FontConfig Found
PAM disabled
ConsoleKit disabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring incomplete, errors occurred!

Run Build Command(s):/usr/bin/make -f Makefile cmTC_88b6c/fast && /usr/bin/make -f CMakeFiles/cmTC_88b6c.dir/build.make CMakeFiles/cmTC_88b6c.dir/build
make[1]: Entering directory '/home/slitaz/wok/slim/source/slim-1.3.6/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_88b6c.dir/CheckFunctionExists.c.o
/usr/bin/cc -march=i486 -Os -pipe -fomit-frame-pointer -Wall -g -O2 -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_88b6c.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFun
Linking C executable cmTC_88b6c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_88b6c.dir/link.txt --verbose=1
/usr/bin/cc -march=i486 -Os -pipe -fomit-frame-pointer -Wall -g -O2 -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_88b6c.dir/CheckFunctionExists.c.o -o cmTC_88b6c -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_88b6c.dir/build.make:99: cmTC_88b6c] Error 1
make[1]: Leaving directory '/home/slitaz/wok/slim/source/slim-1.3.6/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_88b6c/fast] Error 2


https://forum.slitaz.org/topic/slitaz-development-strategy-direction/page/5#post-50768 


Asked 
Viewed 112k times
45

I have c++ project that was smoothly running on a given machine, and now I am trying to compile it on another one with the same operating system (Xubuntu 14.04).

I've installed all the dependencies and I'am using cmake to build the project, although it stops with the following error:

Determining if the function pthread_create exists in the pthreads failed with the following output: ... /usr/bin/ld: cannot find -lpthreads



 


 


 

9 Answers

31

The problem was happening when running cmake. Though, in this case cmake was not the problem the error was silent and the -lpthreads related error/warning was the only thing being written to the cmake error log file, although that was not causing any issue. I've done a minimal version of the cmakelists.txt and started testing it line by line until I found which package was causing it to stop: finally I found it was a version mismatch...

Hint: search for the actual error message

Typically you'd look for the last error message. However, this (often useful) strategy in such cases leads astray.

What you are looking at is the CMakeCache.txt, the CMakeOutput.log or the CMakeError.logHow comes? When some of the macros or tests in the configure phase fails, CMake "helpfully" dumps these files to the output. Unfortunately, these files can be thousands of lines long, and typically contain lots of "*** Error: xyz" entries, for various configure checks. The one for "-lpthreads" just accidentally happened to be the last one in the log...

Solution: go through the log from the top, identify the section with the configure checks, find the last configure check prior to the point, where CMake identifies failure and dumps its logs. You might also try so search for the text "Configuring incomplete, errors occurred!"

Typically you'll either find a very precise actual error message there, or at least you find the name / path of the macro or function called last, and this allows you to pinpoint down what actually went wrong.