Build issues on OSX
Posted: 14 Feb 2017 23:43
Hi,
I just cloned trunk from git.openttd.org
Attempted to build it, and was greeted by an error message at what seemed like the final linking step about the symbols iconv and open_iconv.
It seems that config.lib script doesn't detect the need to link with libiconv, so I made a patch for it:
https://gist.github.com/GBuella/ddcadef ... 3d1b510d39
( I didn't try this on other OS's )
Also, the configure script allows a build without even finding the iconv header -- iconv seems to be used in src/os/unix/unix.cpp
Probably this should be fixed as well.
About the patch:
The reason it didn't detect the need for -liconv, is that it didn't even find the header file in the first place. I removed the code looking for the header file with a test that just compiles a file #include-ing iconv.h -- clang installed with xcode knows about the correct sysroot, and finds iconv.h
On system:
MacOS Sierra 10.12.2, with newest Xcode installed, iconv.h happens to be at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/iconv.h
I also tried to register an account in the bugtracker, but I didn't recieve a validation email yet...
Cheers,
Tej
I just cloned trunk from git.openttd.org
Attempted to build it, and was greeted by an error message at what seemed like the final linking step about the symbols iconv and open_iconv.
It seems that config.lib script doesn't detect the need to link with libiconv, so I made a patch for it:
https://gist.github.com/GBuella/ddcadef ... 3d1b510d39
( I didn't try this on other OS's )
Also, the configure script allows a build without even finding the iconv header -- iconv seems to be used in src/os/unix/unix.cpp
Probably this should be fixed as well.
About the patch:
The reason it didn't detect the need for -liconv, is that it didn't even find the header file in the first place. I removed the code looking for the header file with a test that just compiles a file #include-ing iconv.h -- clang installed with xcode knows about the correct sysroot, and finds iconv.h
On system:
MacOS Sierra 10.12.2, with newest Xcode installed, iconv.h happens to be at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/iconv.h
I also tried to register an account in the bugtracker, but I didn't recieve a validation email yet...
Cheers,
Tej