<p></p>
<h2 dir="auto">What version of osm2pgsql are you using?</h2>
<p dir="auto">git master branch latest checkout of today</p>
<h2 dir="auto">What operating system and PostgreSQL/PostGIS version are you using?</h2>
<p dir="auto">Ubuntu 18:04 LTS /  PG 10</p>
<h2 dir="auto">Tell us something about your system</h2>
<p dir="auto">64GB</p>
<h2 dir="auto">What did you do exactly?</h2>
<p dir="auto">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.</p>
<h2 dir="auto">What did you expect to happen?</h2>
<p dir="auto">Clean build</p>
<h2 dir="auto">What did happen instead?</h2>
<p dir="auto">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</p>
<p dir="auto">fyi:<br>
CORES=8</p>
<pre><code>root@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".
</code></pre>
<h2 dir="auto">What did you do to try analyzing the problem?</h2>
<pre><code>root@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@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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/1600">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353Q3WDJFLU7K5DJVLH3USCNTBANCNFSM5KQO5UEQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353QR6DOA2BXXPPZWPQDUSCNTBA5CNFSM5KQO5UE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QF2O3NA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/issues/1600</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/1600",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/1600",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>