Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpostal doesn't build on the latest version of MSYS2 #903

Closed
kyrill007 opened this issue Jul 11, 2020 · 6 comments
Closed

libpostal doesn't build on the latest version of MSYS2 #903

kyrill007 opened this issue Jul 11, 2020 · 6 comments
Labels

Comments

@kyrill007
Copy link

It looks like libpostal refuses to gcc compile on the latest version (2020062) of MSYS - here is the error that I am getting:

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build_trans_table-string_utils.o:C:\idexx\FOSS\javacpp-presets\libpostal\cppbuild\windows-x86_64\libpostal-1.1-alpha\src/klib/drand48.h:32: multiple definition of `_rand48_seed'; build_trans_table-transliteration_table_builder.o:C:\idexx\FOSS\javacpp-presets\libpostal\cppbuild\windows-x86_64\libpostal-1.1-alpha\src/klib/drand48.h:32: first defined here
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:1078: build_trans_table.exe] Error 1

This error is present when I try to build libpostal directly too (not through javacpp-presets). An experienced C developer, I think, should be able to resolve this issue rather quickly. Thank you, guys, in advance. You should be able to reproduce this error immediately if you install msys2-x86_64-20200629.exe.

@saudet
Copy link
Member

saudet commented Jul 11, 2020

Please report upstream!

If you don't need to use the latest version of mingw-w64 though, downgrade to a known good version and it will work:
https://github.com/bytedeco/javacpp-presets/blob/master/ci/install-windows.sh#L156

@kyrill007
Copy link
Author

Eh... msys (regardless of its version) will pull the latest versions of dependencies. It is most certainly some kind of dependency problem, possibly, in how 32-bit and 64-bit gcc interaction is handled. It is not even clear to me where to report... To msys team? They will say to go libpostal. I've already reported it to libpostal, but they don't seem to care much about windows support. I've been very impressed with what you've done with your build scripts, so I thought, maybe, it will be easy for the bytedeco team to figure out (it should be a simple problem).

@saudet
Copy link
Member

saudet commented Jul 11, 2020

/cc @Maurice-Betzel

@saudet
Copy link
Member

saudet commented Sep 10, 2020

BTW, why do you need to build from source? If there is anything that you need fixed, just send a pull request here, and you'll be able to get new binaries from the CI servers automatically without breaking a sweat.

@lumen00000
Copy link

lumen00000 commented Nov 2, 2020

For a successful build, you need to remove "multiple definitions".
Comment out these lines in the src/klib/drand48.h file:

     // unsigned short _rand48_seed [3];
     // unsigned short _rand48_mult [3];
     // unsigned short _rand48_add;

Then run again make -j4

@saudet
Copy link
Member

saudet commented Nov 24, 2020

Thanks @lumen00000! I've applied this change in commit 1d22113.

@saudet saudet closed this as completed Nov 24, 2020
saudet added a commit that referenced this issue Nov 26, 2020
 * Fix builds for NumPy and SciPy on Linux
saudet added a commit that referenced this issue Nov 26, 2020
 * Fix builds for NumPy and SciPy on Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants