<div dir="ltr">Hi,<div><br></div><div>Fedora has not yet updated their mingw32 and ming64 packages for PhysicsFS 3, so I’m trying to build it from source on my Fedora 27 cross-compile build slave. From the mailing list archives, I’ve cobbled together this toolchain file for CMake:</div><div><br></div><div><div><font face="monospace, monospace">set(CMAKE_SYSTEM_NAME Windows)</font></div><div><font face="monospace, monospace">set(CMAKE_INSTALL_PREFIX /usr/i686-w64-ming32/sys-root/mingw)</font></div><div><font face="monospace, monospace">set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)</font></div><div><font face="monospace, monospace">set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)</font></div><div><font face="monospace, monospace">set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)</font></div><div><font face="monospace, monospace">set(CMAKE_SHARED_LINKER_FLAGS -static-libgcc ..)</font></div><div><font face="monospace, monospace">set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 )</font></div><div><font face="monospace, monospace">set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)</font></div><div><font face="monospace, monospace">set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)</font></div><div><font face="monospace, monospace">set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)</font></div></div><div><br clear="all"><div>But when I attempt to configure with it:</div><div><br></div><div><div><font face="monospace, monospace">$ cmake -DCMAKE_TOOLCHAIN_FILE=i686-w64-mingw32.cmake</font></div><div><font face="monospace, monospace">-- The CXX compiler identification is GNU 7.2.0</font></div><div><font face="monospace, monospace">-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-gcc</font></div><div><font face="monospace, monospace">-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-gcc -- broken</font></div><div><font face="monospace, monospace">CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):</font></div><div><font face="monospace, monospace">  The C++ compiler</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">    "/usr/bin/i686-w64-mingw32-gcc"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  is not able to compile a simple test program.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  It fails with the following output:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">    Change Dir: /home/fedora/Coding/physfs-3.0.1/CMakeFiles/CMakeTmp</font></div><div><font face="monospace, monospace">    </font></div><div><font face="monospace, monospace">    Run Build Command:"/usr/bin/gmake" "cmTC_0d37d/fast"</font></div><div><font face="monospace, monospace">    /usr/bin/gmake -f CMakeFiles/cmTC_0d37d.dir/build.make CMakeFiles/cmTC_0d37d.dir/build</font></div><div><font face="monospace, monospace">    gmake[1]: Entering directory '/home/fedora/Coding/physfs-3.0.1/CMakeFiles/CMakeTmp'</font></div><div><font face="monospace, monospace">    Building CXX object CMakeFiles/cmTC_0d37d.dir/testCXXCompiler.cxx.o</font></div><div><font face="monospace, monospace">    /usr/bin/i686-w64-mingw32-gcc     -o CMakeFiles/cmTC_0d37d.dir/testCXXCompiler.cxx.o -c /home/fedora/Coding/physfs-3.0.1/CMakeFiles/CMakeTmp/testCXXCompiler.cxx</font></div><div><font face="monospace, monospace">    Linking CXX executable cmTC_0d37d</font></div><div><font face="monospace, monospace">    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d37d.dir/link.txt --verbose=1</font></div><div><font face="monospace, monospace">    /usr/bin/i686-w64-mingw32-gcc       -rdynamic CMakeFiles/cmTC_0d37d.dir/testCXXCompiler.cxx.o  -o cmTC_0d37d </font></div><div><font face="monospace, monospace">    i686-w64-mingw32-gcc: error: unrecognized command line option '-rdynamic'</font></div><div><font face="monospace, monospace">    gmake[1]: *** [CMakeFiles/cmTC_0d37d.dir/build.make:98: cmTC_0d37d] Error 1</font></div><div><font face="monospace, monospace">    gmake[1]: Leaving directory '/home/fedora/Coding/physfs-3.0.1/CMakeFiles/CMakeTmp'</font></div><div><font face="monospace, monospace">    gmake: *** [Makefile:126: cmTC_0d37d/fast] Error 2</font></div><div><font face="monospace, monospace">    </font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">  CMake will not be able to correctly generate this project.</font></div><div><font face="monospace, monospace">Call Stack (most recent call first):</font></div><div><font face="monospace, monospace">  CMakeLists.txt:14 (project)</font></div><div><br></div></div><div><br></div><div>The generated logs don’t provide anything terribly interesting — literally just the output above. That <font face="monospace, monospace">-rdynamic</font> flag is throwing a wrench into things. Any ideas as to where that is coming from, or how to turn it off? Grepping the directory for it only shows hits in the logs themselves.</div><div><br></div><div>Thanks!</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Jay Dolan<div>508-415-1866</div></div></div>
</div></div>