Anonymous Login
2017-09-20 11:04 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001935OpenClonkDevelopment Environmentpublic2017-09-17 15:36
Reporteryonmoon 
Assigned ToCaesar 
PrioritynormalSeveritytweakReproducibilityalways
StatusassignedResolutionreopened 
PlatformGNU G++OSLinuxOS Version Fedora 26
Product Version 
Target VersionFixed in Version 
Summary0001935: Error running link command: Segmentation fault,
DescriptionError running link command: Segmentation fault
make[2]: *** [CMakeFiles/libmisc.dir/build.make:694:liblibmisc.a] 错误 1
make[1]: *** [CMakeFiles/Makefile2:184:CMakeFiles/libmisc.dir/all] 错误 2
make: *** [Makefile:152:all] 错误 2
Steps To ReproduceBelow is make cmake .. output:
Using /usr/bin/gcc-ar instead of /usr/bin/gcc-ar to support lto objects.
Using /usr/bin/gcc-ranlib instead of /usr/bin/gcc-ranlib to support lto objects.
-- Checking for module 'freetype2'
-- Found freetype2, version 19.0.13
-- Could NOT find libdw (missing: LIBDW_LIBRARY LIBDW_INCLUDE_DIR)
-- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR)
-- BACKWARD_HAS_UNWIND=1
-- BACKWARD_HAS_BACKTRACE=0
-- BACKWARD_HAS_BACKTRACE_SYMBOL=1
-- BACKWARD_HAS_DW=0
-- BACKWARD_HAS_BFD=0
-- Could NOT find Backward (missing: BACKWARD_LIBRARIES)
CMake Warning at CMakeLists.txt:298 (find_package):
  Found package configuration file:

    /home/sysadmin/openclonk/thirdparty/backward-cpp/BackwardConfig.cmake

  but it set Backward_FOUND to FALSE so package "Backward" is considered to
  be NOT FOUND.


-- Checking for module 'gtk+-3.0'
-- Found gtk+-3.0, version 3.22.18
-- Checking for module 'gthread-2.0'
-- Found gthread-2.0, version 2.52.3
-- Checking for module 'gio-2.0'
-- Found gio-2.0, version 2.52.3
-- Checking for module 'gobject-2.0'
-- Found gobject-2.0, version 2.52.3
-- Checking for module 'glib-2.0'
-- Found glib-2.0, version 2.52.3
-- Checking for module 'gtksourceview-3.0'
-- Found gtksourceview-3.0, version 3.24.3
-- Checking for module 'openal>=1.13'
-- Found openal, version 1.17.2
-- Checking for module 'freealut>=1.1.0'
-- Found freealut, version 1.1.0
-- Checking for module 'openal>=1.13'
-- Found openal, version 1.17.2
-- Checking for module 'freealut>=1.1.0'
-- Found freealut, version 1.1.0
-- Using Audio toolkit: OpenAL
-- Could NOT find GTest/GMock (missing: gtest-all.cc)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sysadmin/openclonk
Additional InformationIt seems that libdw libbfd and backward libs cannot be found.But I am using Fedora 26,I cannot find places to get them.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0005755

Caesar (developer)

libdw and libfd are non-essential, they'll just give you a more beautiful error output in the case of openclonk crashing.

I'm not really sure whether this is a bug in our build system, in the linker, or in your system state. Have you tried restarting building OC from a clean slate at least once (i.e. git clean -dfx and then cmake && cmake --build . again)? Also, does this happen for arbitrary configurations (i.e. what about cmake -DCMAKE_BUILD_TYPE=Debug or specifying C=clang CXX=clang++ as environment variables before running cmake for the first time?)

~0005756

yonmoon (reporter)

I am using Fedora 26 and so gcc version is 7.1.1.I don't know if this is caused by gcc compatition.

~0005757

Caesar (developer)

Hm, I've contemplated this again, and I think even if I could reproduce this, there's not much I could do about it…

You could try to use a different compiler and linker (clang, for instance. Or just a different gcc. Who knows what 7.1.1 produces.) if you really want to compile OC.
@Luchs suggested that you could try disabling LTO (But using cmake -DCMAKE_BUILD_TYPE=Debug . should already do that).

If you don't really need to build OC (because you don't want to make changes to the source code), you could just download a prebuilt version (https://autobuild.openclonk.org/jobs/).

In the meantime, I'll close this bug because a crash in the linker should probably be reported to whoever made the linker (GNU binutils?) or your distro, not us… If you can explain how we caused this, please feel free to reopen this.

~0005760

yonmoon (reporter)

I've try using -DCMAKE_BUILD_TYPE=Debug para in complier,But still get error.

~0005765

Kanibal (reporter)

I can reproduce it with fc26. This seems to be a compiler error with the SSE-optimization in C4BltTransform.cpp: https://bugzilla.redhat.com/show_bug.cgi?id=1474073

I can get a working build with clang++ by manually specifying the SSE-level:
$ cmake -DCMAKE_CXX_FLAGS="-msse -msse2 -msse3" ..

~0005766

Kanibal (reporter)

In regards to 0001935:0005765:
The SSE-version used during compilation does not affect the problem; it's really just a problem in the GCC-compiler.

For now, just go with clang:
$ CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ..

~0005773

yonmoon (reporter)

with your workaround,It still get compling errors.

~0005774

yonmoon (reporter)

没有规则可制作目标“liblibmisc.a”,由“CMakeFiles/libc4script_autogen

~0005775

yonmoon (reporter)

part of my compling output:
/usr/include/features.h:180:3: 警告:#warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
[ 4%] Building CXX object CMakeFiles/libmisc.dir/libmisc_autogen/mocs_compilation.cpp.o
[ 5%] Linking CXX static library liblibmisc.a
Error running link command: Segmentation fault
make[2]: *** [CMakeFiles/libmisc.dir/build.make:694:liblibmisc.a] 错误 1
make[1]: *** [CMakeFiles/Makefile2:184:CMakeFiles/libmisc.dir/all] 错误 2

~0005776

Caesar (developer)

@yonmoon:

Did you remove your CMakeCache.txt before you ran
$ CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ..

Also, could you do an $ export VERBOSE=1 before you run make, so we can see which command is actually being run?

Oh, and just to emphasize this again: This is not a bug in OpenClonk, or any of our scripts. We cannot fix this.
+Notes

-Issue History
Date Modified Username Field Change
2017-08-22 17:31 yonmoon New Issue
2017-08-23 13:34 Caesar Note Added: 0005755
2017-08-25 13:57 yonmoon Note Added: 0005756
2017-08-25 18:18 Caesar Assigned To => Caesar
2017-08-25 18:18 Caesar Status new => closed
2017-08-25 18:18 Caesar Resolution open => won't fix
2017-08-25 18:18 Caesar Note Added: 0005757
2017-08-27 06:05 yonmoon Status closed => feedback
2017-08-27 06:05 yonmoon Resolution won't fix => reopened
2017-08-27 06:05 yonmoon Note Added: 0005760
2017-08-30 00:47 Kanibal Note Added: 0005765
2017-08-30 01:36 Kanibal Note Added: 0005766
2017-09-08 08:10 Caesar Status feedback => closed
2017-09-08 08:10 Caesar Resolution reopened => no change required
2017-09-10 11:51 yonmoon Status closed => feedback
2017-09-10 11:51 yonmoon Resolution no change required => reopened
2017-09-10 11:51 yonmoon Note Added: 0005773
2017-09-10 17:04 yonmoon Note Added: 0005774
2017-09-10 17:04 yonmoon Status feedback => assigned
2017-09-10 17:29 yonmoon Note Added: 0005775
2017-09-12 13:54 Caesar Note Added: 0005776
2017-09-17 15:36 Caesar Severity major => tweak
2017-09-17 15:36 Caesar OS Version   =>  Fedora 26
+Issue History