Project

General

Profile

Bug #4002

Build broken on OpenBSD with clang

Added by Juha Erkkilä about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
08/06/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

Build with clang is broken on OpenBSD-current due to missing header inclusion:

/home/je/src/other/openmw/bin/c++ -DBOOST_NO_CXX11_SCOPED_ENUMS=ON -D__STDC_CONSTANT_MACROS -isystem /usr/local/include -I../. -isystem /usr/local/include/SDL2 -isystem /usr/local/include/MYGUI -isystem /usr/local/include/AL -isystem /usr/local/include/bullet -O2 -pipe -I/usr/X11R6/include -pthread -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long -Wno-potentially-evaluated-expression -DNDEBUG -MD -MT apps/openmw/CMakeFiles/openmw.dir/main.cpp.o -MF apps/openmw/CMakeFiles/openmw.dir/main.cpp.o.d -o apps/openmw/CMakeFiles/openmw.dir/main.cpp.o -c /home/je/src/other/openmw/openmw/apps/openmw/main.cpp
/home/je/src/other/openmw/openmw/apps/openmw/main.cpp:360:14: error: use of undeclared identifier 'isatty'
if (!isatty(fileno(stdin)))
^
1 error generated.
ninja: build stopped: subcommand failed.

There is a patch by Marc Espie that fixes this issue
(from https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/games/openmw/patches/patch-apps_openmw_main_cpp):

Index: apps/openmw/main.cpp
--- apps/openmw/main.cpp.orig
++ apps/openmw/main.cpp
@ -1,5 +1,6 @
#include <iostream>
#include <cstdio>
#include <unistd.h>

#include &lt;components/version/version.hpp&gt;
#include &lt;components/files/configurationmanager.hpp&gt;

patch-apps_openmw_main_cpp (335 Bytes) Juha Erkkilä, 08/06/2017 11:58 AM

Associated revisions

Revision 393f4ab7 (diff)
Added by Miroslav Remák about 2 months ago

Add missing include for isatty function (Fixes #4002)

History

#1 Updated by Miroslav Remák about 2 months ago

  • Status changed from New to In Progress
  • Assignee set to Miroslav Remák
  • Target version set to openmw-0.43

#2 Updated by Alexei Dobrohotov about 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF