[Tile-serving] [openstreetmap/osm2pgsql] Commits made after 20/12 broken the build on ubuntu 18.04 (Issue #1600)

Glenn Plas notifications at github.com
Tue Dec 21 15:39:28 UTC 2021


## What version of osm2pgsql are you using?

git master branch latest checkout of today

## What operating system and PostgreSQL/PostGIS version are you using?

Ubuntu 18:04 LTS /  PG 10 

## Tell us something about your system
64GB

## What did you do exactly?
I've got an automated (terraform driven) deployment that builds osm2pgsql from the lastest master tree.  This worked on 20/12 perfectly  (and always has btw).  Until I ran it today (21/12).  I suspect some commits have broken this.  I understand this is bleeding edge, I just want to give the headsup.

## What did you expect to happen?

Clean build

## What did happen instead?

The configure phase of the build seems to have a problem with pthreads now.  Although the error messages tend to lean towards a linking error, it seems the problem is already in the configuration stage.  This might be a macro problem maybe.  I'm a bit rusty in C

 
fyi:
CORES=8

```
root at grb-db-0:/usr/local/src/osm2pgsql# cd /usr/local/src/osm2pgsql && mkdir build && cd build && cmake .. && make -j ${CORES} && make install
-- The CXX compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building osm2pgsql 1.5.1
-- Building in C++14 mode
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- Looking for include file termios.h
CMake Error at /usr/share/cmake-3.10/Modules/CheckIncludeFiles.cmake:69 (try_compile):
  Unknown extension ".c" for file

    /usr/local/src/osm2pgsql/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c

  try_compile() works only for enabled languages.  Currently these are:

    CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:163 (CHECK_INCLUDE_FILES)


-- Looking for include file termios.h - not found
-- Looking for include file unistd.h
CMake Error at /usr/share/cmake-3.10/Modules/CheckIncludeFiles.cmake:69 (try_compile):
  Unknown extension ".c" for file

    /usr/local/src/osm2pgsql/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c

  try_compile() works only for enabled languages.  Currently these are:

    CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:164 (CHECK_INCLUDE_FILES)


-- Looking for include file unistd.h - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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  
-- Found Protozero: /usr/local/src/osm2pgsql/contrib/protozero/include (found suitable version "1.7.0", minimum required is "1.6.3") 
-- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found version "2.2.5") 
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6") 
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Osmium: /usr/local/src/osm2pgsql/contrib/libosmium/include (found suitable version "2.17.2", minimum required is "2.17.2") 
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.2.4") 
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   filesystem
-- Found PostgreSQL: /usr/lib/x86_64-linux-gnu/libpq.so (found version "10.19 (Ubuntu 10.19-0ubuntu0.18.04.1)") 
-- Found proj_api.h
-- Found Proj [API 4] /usr/lib/x86_64-linux-gnu/libproj.so
-- Libraries used to build: /usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libpq.so;/usr/lib/x86_64-linux-gnu/libz.so;-lpthread;/usr/lib/x86_64-linux-gnu/libexpat.so;/usr/lib/x86_64-linux-gnu/libbz2.so;/usr/lib/x86_64-linux-gnu/libproj.so;/usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so
You have called ADD_LIBRARY for library osm2pgsql_lib without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Looking for clang-tidy
-- Looking for clang-tidy - found /usr/bin/clang-tidy
-- Tests disabled. Set BUILD_TESTS=ON to enable tests.
-- Looking for pandoc
-- Looking for pandoc - found
--   Manual page can be built using 'man' target
-- Configuring incomplete, errors occurred!
See also "/usr/local/src/osm2pgsql/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/src/osm2pgsql/build/CMakeFiles/CMakeError.log".
```

## What did you do to try analyzing the problem?

```
root at grb-db-0:/usr/local/src/osm2pgsql/build# find /lib -name "*pthread*"
/lib/x86_64-linux-gnu/libpthread.so.0
/lib/x86_64-linux-gnu/libpthread-2.27.so
root at grb-db-0:/usr/local/src/osm2pgsql/build# nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep "pthread_create"
00000000000079b0 t __pthread_create_2_1
00000000000079b0 T pthread_create@@GLIBC_2.2.5
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1600
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/1600 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20211221/90bc3d12/attachment.htm>


More information about the Tile-serving mailing list