# Cmake hung at pkg-config in SLES12

**URL:** https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729
**Category:** Usage
**Created:** [May 25, 2022, 7:12am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729 "2022-05-25T07:12:48Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [May 25, 2022, 7:12am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/1 "2022-05-25T07:12:48Z")

</div>

Hi Team,

Cmake is hung while finding any package that depends on pkg-config package:

cmake version: _cmake version 3.15.7_

in CMakeLists.txt:  
find\_package(EXPAT REQUIRED)  
find\_package(X11 REQUIRED)

logs:  
pbi-32-s12:/home/sudemo # pstree 8158  
cmake───pkg-config

– Found PkgConfig: /usr/bin/pkg-config (found version “0.28”)  
– Checking for module ‘expat’  
– Found expat, version 2.1.0

```auto
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(61): set(_pkgconfig_invoke_result )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(63): execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --static;--cflags expat OUTPUT_VARIABLE _pkgconfig_invoke_result RESULT_VARIABLE _pkgconfig_failed OUTPUT_STRIP_TRAILING_WHITESPACE )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(69): if(_pkgconfig_failed )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(72): else()
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(73): string(REGEX REPLACE [\r\n] _pkgconfig_invoke_result ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(75): if(NOT STREQUAL )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(79): separate_arguments(_pkgconfig_invoke_result )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(82): set(_pkgconfig_STATIC_CFLAGS ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(83): _pkgconfig_set(PC_EXPAT_STATIC_CFLAGS ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(56): set(PC_EXPAT_STATIC_CFLAGS CACHE INTERNAL )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(497): _pkgconfig_invoke_dyn(${_pkg_check_modules_packages} PC_EXPAT CFLAGS_OTHER --cflags-only-other )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(98): _pkgconfig_invoke(expat PC_EXPAT CFLAGS_OTHER --cflags-only-other )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(61): set(_pkgconfig_invoke_result )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(63): execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags-only-other expat OUTPUT_VARIABLE _pkgconfig_invoke_result RESULT_VARIABLE _pkgconfig_failed OUTPUT_STRIP_TRAILING_WHITESPACE )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(69): if(_pkgconfig_failed )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(72): else()
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(73): string(REGEX REPLACE [\r\n] _pkgconfig_invoke_result ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(75): if(NOT STREQUAL )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(79): separate_arguments(_pkgconfig_invoke_result )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(82): set(_pkgconfig_CFLAGS_OTHER ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(83): _pkgconfig_set(PC_EXPAT_CFLAGS_OTHER ${_pkgconfig_invoke_result} )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(56): set(PC_EXPAT_CFLAGS_OTHER CACHE INTERNAL )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(99): _pkgconfig_invoke(expat PC_EXPAT STATIC_CFLAGS_OTHER --static --cflags-only-other )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(61): set(_pkgconfig_invoke_result )
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(63): execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --static;--cflags-only-other expat OUTPUT_VARIABLE _pkgconfig_invoke_result RESULT_VARIABLE _pkgconfig_failed OUTPUT_STRIP_TRAILING_WHITESPACE )

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 25, 2022, 2:32pm UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/2 "2022-05-25T14:32:29Z")

</div>

> [@SudeshnaMoulik](#):
>
> `${PKG_CONFIG_EXECUTABLE} --static --cflags-only-other expat`

If you run this command, does it work locally?

FYI @Dakon

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [May 26, 2022, 5:36am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/3 "2022-05-26T05:36:42Z")

</div>

pbi-26-s12-cray:/home/sanketb # /usr/bin/pkg-config --static --cflags-only-other expat

pbi-26-s12-cray:/home/sanketb #

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [May 27, 2022, 7:09am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/4 "2022-05-27T07:09:07Z")

</div>

Hey,  
Can someone please take a look on why cmake hung at pkg-config in SLES12 platform ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 27, 2022, 1:04pm UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/5 "2022-05-27T13:04:46Z")

</div>

I think using `strace -f` to figure out where it is hanging would be one way to continue on in lieu of any specific help here (sorry, I don’t have the time right now).

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [June 6, 2022, 12:01am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/6 "2022-06-06T00:01:39Z")

</div>

Hey Ben,

Here is the strace log attached, when cmake was hung.

ps -ef | grep cmake  
root 10654 10507 7 16:53 pts/0 00:00:03 cmake -DPBS\_VERSION=2022.1.0.20220603185800 -DCMAKE\_C\_FLAGS=-g -Wall -Werror -Wno-unused-result -fPIC -D\_LARGEFILE\_SOURCE -O2 -DCMAKE\_CXX\_FLAGS=-g -Wall -Werror -Wno-unused-result -fPIC -O2 -D–with-database-dir=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/pgsql -D–with-database-user=pbsdata -D–with-editline=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/editline -D–with-tcl=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/tcltk -D–with-libical=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/libical -D–with-python=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/python -D–with-alsdk=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/alsdk -D–with-swig=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/swig -D–with-expat=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/expat -D–with-hwloc=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/hwloc -D–with-webapi=/home/pbsbuild/ramdisk/workspace/build/linux312\_x86\_64-work/webapi --enable-alps -D–prefix=/opt/pbs /home/pbsbuild/ramdisk/workspace/build/pbspro  
root 12543 12494 0 16:54 pts/1 00:00:00 grep --color=auto cmake

As am unable to attach the full **strace log,** sharing the snippet:

10654 — SIGCHLD {si\_signo=SIGCHLD, si\_code=CLD\_EXITED, si\_pid=12454, si\_status=0, …} —  
10654 read(3, 0x7fffdd5d6643, 1) = -1 EAGAIN (Resource temporarily unavailable)  
10654 write(4, “\1”, 1) = 1  
10654 rt\_sigreturn() = -1 EINTR (Interrupted system call)  
10654 select(4, [3], NULL, NULL, NULL) = 1 (in [3])  
10654 read(3, “\1”, 1024) = 1  
10654 rt\_sigprocmask(SIG\_BLOCK, [INT TERM], [], 8) = 0  
10654 wait4(12454, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 12454  
10654 close(4) = 0  
10654 rt\_sigprocmask(SIG\_SETMASK, [], NULL, 8) = 0  
10654 select(4, [3], NULL, NULL, NULL) = 1 (in [3])  
10654 read(3, “”, 1024) = 0  
10654 close(3) = 0  
10654 rt\_sigaction(SIGCHLD, {SIG\_DFL, [], SA\_RESTORER, 0x7ffca2725890}, NULL, 8) = 0  
.  
.  
12549 execve("/usr/bin/pkg-config", ["/usr/bin/pkg-config", “–libs-only-l”, “expat”], [/\* 69 vars \*/] \<unfinished …\>  
10654 \<… read resumed\> “”, 1) = 0  
12549 \<… execve resumed\> ) = 0  
10654 close(11) = 0  
12549 brk(0 \<unfinished …\>  
10654 rt\_sigprocmask(SIG\_SETMASK, [], \<unfinished …\>  
12549 \<… brk resumed\> ) = 0xf34000  
10654 \<… rt\_sigprocmask resumed\> NULL, 8) = 0  
10654 read(9, \<unfinished …\>  
12549 mmap(NULL, 4096, PROT\_READ|PROT\_WRITE, MAP\_PRIVATE|MAP\_ANONYMOUS, -1, 0 \<unfinished …\>  
10654 \<… read resumed\> “”, 1024) = 0  
12549 \<… mmap resumed\> ) = 0x7fce89436000  
10654 close(9) = 0  
12549 access("/etc/ld.so.preload", R\_OK \<unfinished …\>  
10654 close(6 \<unfinished …\>  
12549 \<… access resumed\> ) = -1 ENOENT (No such file or directory)  
10654 \<… close resumed\> ) = 0  
10654 close(8 \<unfinished …\>  
12549 open("/etc/ld.so.cache", O\_RDONLY|O\_CLOEXEC \<unfinished …\>  
10654 \<… close resumed\> ) = 0  
12549 \<… open resumed\> ) = 3  
10654 select(8, [3 5 7], NULL, NULL, NULL \<unfinished …\>  
12549 fstat(3, {st\_mode=S\_IFREG|0644, st\_size=78202, …}) = 0

**Noticed, after running strace the hung got cleared**

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [June 6, 2022, 12:43am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/7 "2022-06-06T00:43:42Z")

</div>

Noticed similar type of hang at pkg-config for **FindX11.cmake** module too:

/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(56): set(PKG\_FONTCONFIG\_STATIC\_CFLAGS -I/usr/include/freetype2 CACHE INTERNAL )  
Called from: [8] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[7] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[6] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[5] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.15/Modules/FindFontconfig.cmake  
[2] /opt/tools/share/cmake-3.15/Modules/FindX11.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(497): \_pkgconfig\_invoke\_dyn(fontconfig PKG\_FONTCONFIG CFLAGS\_OTHER --cflags-only-other )  
Called from: [5] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.15/Modules/FindFontconfig.cmake  
[2] /opt/tools/share/cmake-3.15/Modules/FindX11.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(98): \_pkgconfig\_invoke(fontconfig PKG\_FONTCONFIG CFLAGS\_OTHER --cflags-only-other )  
Called from: [6] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[5] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.15/Modules/FindFontconfig.cmake  
[2] /opt/tools/share/cmake-3.15/Modules/FindX11.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(61): set(\_pkgconfig\_invoke\_result )  
Called from: [7] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[6] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[5] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.15/Modules/FindFontconfig.cmake  
[2] /opt/tools/share/cmake-3.15/Modules/FindX11.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake(63): execute\_process(COMMAND /usr/bin/pkg-config --cflags-only-other fontconfig OUTPUT\_VARIABLE \_pkgconfig\_invoke\_result RESULT\_VARIABLE \_pkgconfig\_failed OUTPUT\_STRIP\_TRAILING\_WHITESPACE )  
Called from: [7] /opt/tools/share/cmake-3.15/Modules\*\*/FindPkgConfig.cmake\*\*  
[6] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[5] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.15/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.15/Modules/FindFontconfig.cmake  
[2] /opt/tools/share/cmake-3.15/Modules/FindX11.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
^C

CMake is not progressing after this.

pbi-26-s12-cray:/home/pbsbuild/ramdisk/workspace/build # **/usr/bin/pkg-config --cflags-only-other fontconfig**

pbi-26-s12-cray:/home/pbsbuild/ramdisk/workspace/build #

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [June 6, 2022, 12:47am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/8 "2022-06-06T00:47:28Z")

</div>

**corresponding strace log:**

22964 execve("/usr/bin/pkg-config", ["/usr/bin/pkg-config", “–static”, “–cflags-only-other”, “fontconfig”], [/\* 69 vars \*/] \<unfinished …\>  
21009 \<… read resumed\> “”, 1) = 0  
22964 \<… execve resumed\> ) = 0  
21009 close(11) = 0  
21009 rt\_sigprocmask(SIG\_SETMASK, [], \<unfinished …\>  
22964 brk(0 \<unfinished …\>  
21009 \<… rt\_sigprocmask resumed\> NULL, 8) = 0  
22964 \<… brk resumed\> ) = 0x1aa3000  
21009 read(9, “”, 1024) = 0  
21009 close(9 \<unfinished …\>  
22964 mmap(NULL, 4096, PROT\_READ|PROT\_WRITE, MAP\_PRIVATE|MAP\_ANONYMOUS, -1, 0 \<unfinished …\>  
21009 \<… close resumed\> ) = 0  
22964 \<… mmap resumed\> ) = 0x7f554247c000  
21009 close(6) = 0  
22964 access("/etc/ld.so.preload", R\_OK \<unfinished …\>  
21009 close(8 \<unfinished …\>  
22964 \<… access resumed\> ) = -1 ENOENT (No such file or directory)  
21009 \<… close resumed\> ) = 0  
21009 select(8, [3 5 7], NULL, NULL, NULL \<unfinished …\>

Is there any problem in **pkg-config for SLES12 platform**?

---

<div class="post-metadata">

### Author: ![SudeshnaMoulik](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sudeshnamoulik/32/2453_2.png) [@SudeshnaMoulik](https://discourse.cmake.org/u/SudeshnaMoulik)
#### Post date: [June 6, 2022, 4:29am UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/9 "2022-06-06T04:29:30Z")

</div>

Noticed cmake hung issue for “cmake version 3.19.2” also.

/opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake(571): \_pkgconfig\_invoke(expat PC\_EXPAT VERSION --modversion )  
Called from: [4] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[2] /home/pbsbuild/ramdisk/workspace/build/pbspro/cmake/FindEXPAT.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake(88): set(\_pkgconfig\_invoke\_result )  
Called from: [5] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[2] /home/pbsbuild/ramdisk/workspace/build/pbspro/cmake/FindEXPAT.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt  
/opt/tools/share/cmake-3.19/Modules/ **FindPkgConfig.cmake** (90): execute\_process(COMMAND /usr/bin/pkg-config --modversion expat OUTPUT\_VARIABLE \_pkgconfig\_invoke\_result RESULT\_VARIABLE \_pkgconfig\_failed OUTPUT\_STRIP\_TRAILING\_WHITESPACE )  
Called from: [5] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[4] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[3] /opt/tools/share/cmake-3.19/Modules/FindPkgConfig.cmake  
[2] /home/pbsbuild/ramdisk/workspace/build/pbspro/cmake/FindEXPAT.cmake  
[1] /home/pbsbuild/ramdisk/workspace/build/pbspro/CMakeLists.txt

**Output of the command from cli:**

pbi-32-s12:/home/sudemo # /usr/bin/pkg-config --modversion expat  
2.1.0  
pbi-32-s12:/home/sudemo #usage

**Strace log snippet:**

27674 write(2, “/opt/tools/share/cmake-3.19/Modu”…, 133) = 133  
27674 write(2, “\n Called from: [6]\t/opt/tools/”…, 473) = 473  
27674 write(2, “\n”, 1) = 1  
.  
.  
3811 execve("/usr/bin/pkg-config", ["/usr/bin/pkg-config", “–variable=prefix”, “expat”], [/\* 130 vars \*/] \<unfinished …\>  
27674 \<… read resumed\> “”, 1) = 0  
3811 \<… execve resumed\> ) = 0  
27674 close(11) = 0  
3811 brk(0 \<unfinished …\>  
27674 rt\_sigprocmask(SIG\_SETMASK, [QUIT], \<unfinished …\>  
3811 \<… brk resumed\> ) = 0xb34000  
27674 \<… rt\_sigprocmask resumed\> NULL, 8) = 0  
27674 read(9, “”, 1024) = 0  
3811 mmap(NULL, 4096, PROT\_READ|PROT\_WRITE, MAP\_PRIVATE|MAP\_ANONYMOUS, -1, 0 \<unfinished …\>  
27674 close(9 \<unfinished …\>  
3811 \<… mmap resumed\> ) = 0x7f0c305f1000  
27674 \<… close resumed\> ) = 0  
27674 close(6 \<unfinished …\>  
3811 access("/etc/ld.so.preload", R\_OK \<unfinished …\>  
27674 \<… close resumed\> ) = 0  
3811 \<… access resumed\> ) = -1 ENOENT (No such file or directory)  
27674 close(8) = 0  
3811 open("/etc/ld.so.cache", O\_RDONLY|O\_CLOEXEC \<unfinished …\>  
27674 select(8, [3 5 7], NULL, NULL, NULL \<unfinished …\>  
3811 \<… open resumed\> ) = 3  
3811 fstat(3, {st\_mode=S\_IFREG|0644, st\_size=97128, …}) = 0  
3811 mmap(NULL, 97128, PROT\_READ, MAP\_PRIVATE, 3, 0) = 0x7f0c305d9000  
3811 close(3) = 0

Ca you please confirm whether the problem exists in FindPkgConfig.cmake module or SLES12 platform specific ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [June 6, 2022, 1:51pm UTC](https://discourse.cmake.org/t/cmake-hung-at-pkg-config-in-sles12/5729/10 "2022-06-06T13:51:02Z")

</div>

I haven’t heard about it from anyone else at least. I’ll keep an eye out for similar reports though.
