Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#15356 closed bug (fixed)

cmake fails to detect compiler

Reported by: pulkomandy Owned by: waddlesplash
Priority: normal Milestone: R1/beta2
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #14961
Platform: All

Description

hrev53481. I cannot compile anything using cmake. Tried building an older cmake 3.9 from haikuports recipe, bootstrap went fine but after that it failed with the same error running the bootstrap cmake.

CMake Error at /boot/system/data/cmake/Modules/CMakeDetermineCompilerId.cmake:219 (file):
  file write failed (Bad address):

    /Git/haiku/renga/build/CMakeFiles/3.15.3/CompilerIdC/CMakeCCompilerId.c
Call Stack (most recent call first):
  /boot/system/data/cmake/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
  /boot/system/data/cmake/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /boot/system/data/cmake/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (project)

Running gcc works just fine. I looked at the cmake scripts and it's trying to write something to a .c file there, but the file ends up empty. The "bad address" error looks like it could be some of the new security checks preventing it to map the file or something?

Change History (3)

comment:1 by pulkomandy, 5 years ago

Owner: changed from nobody to waddlesplash
Status: newassigned

strace shows a "writev" call right before the error so I assume https://git.haiku-os.org/haiku/commit/?id=2b5ebfcfd578f177968c5b923e5ccd6eb0195674 was not sufficiently tested?

[  1605] open(0xffffffff, "/Git/haiku/renga/build/CMakeFiles/3.15.3/CompilerIdCXX/CMakeCXXCompilerId.cpp", 0x601, 0x1a4) = 0x00000003 (747 us)
[  1605] writev(0x3, 0xffffffffffffffff, 0x721ccf40, 0x2) = 0x80001301 (2 us)
[  1605] close(0x3) = 0x00000000 No error (4 us)
CMake Error at /boot/system/data/cmake/Modules/CMakeDetermineCompilerId.cmake:219 (file):
  file write failed (Bad address):

comment:2 by waddlesplash, 5 years ago

Blocking: 14961 added
Resolution: fixed
Status: assignedclosed

Fixed in hrev53548.

comment:3 by nielx, 4 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.