[odb-users] Problem with building odb compiler 2.4 with mingw-w64 for Windows x86_64

Савицкий Юрий mr-l-ik at yandex.ru
Wed Feb 7 00:17:29 EST 2018


Hello,

I am trying to compile odb compiler for x86_64 for windows with mingw-w64.
We use gcc 4.8.3 for building our main project so I must try to use it first.
I was trying to build gcc 4.8.3 with enable-plugin myself using nixman mingw build script from https://github.com/niXman/mingw-builds.
I saw that there is such patch https://patchwork.ozlabs.org/patch/837713/ so I use binutils 2.30.
After success building of mingw "gcc --version" show me --enable-plugin flag, but ./configure of odb still telling me that my gcc does not support plugin.
So I get version with enable-plugin (I suppose) from https://sourceforge.net/projects/tumagcc/files/0.8a/gcc-474pre_483pre.7z.
I was able to configure odb with that gcc build, but after make procedure I get static odb.a plugin and odb.exe can't use it.
During make procedure I mentioned such warning:
"undefined symbols not allowed in x86_64-w64-mingw32 shared libraries"
Then I added -no-undefined to odb_la_LDFLAGS in /odb/Makefile.am and get heap of "undefined reference" mistakes such as:

...
"undefined reference to `input_location'"
"undefined reference to `cpp_get_callbacks(cpp_reader*)'"
"undefined reference to `cpp_get_token(cpp_reader*)'"
"undefined reference to `get_identifier(char const*)'"
"undefined reference to `cpp_destroy(cpp_reader*)'"
"undefined reference to `expand_location(unsigned int)'"
"undefined reference to `cutl::compiler::cxx_indenter<char>::keyword(cutl::compiler::cxx_indenter<char>::keyword_type)'"
"undefined reference to `__imp__ZTVN4cutl9container7no_nodeE'"
...

I fix some cutl undefined reference by adding LIBCUTL_EXPORT in /odb/re.hxx, but I can't do anithing with:

...
"undefined reference to `current_scope()'"
"undefined reference to `tree_code_type'"
"undefined reference to `current_scope()'"
"undefined reference to `global_namespace'"
...

I can provide full log of errors: https://yadi.sk/i/ulOVXzpy3SAGoP

My questions are:
May be there is prebuild version of odb compiler for x86_64 windows somewhere?
Could you please help me some way to build gcc of any version with enable-plugin as mentioned in https://patchwork.ozlabs.org/patch/837713/?
And is it even possible to build odb compiler with gcc 4.8.3 (or any kind) mingw-w64 for x86_64 windows? :)

P.S.: I have to change "struct stat st" on "struct __stat64 st" in /configure/ltmain.sh. I suppose it relate to mingw gcc features.



More information about the odb-users mailing list