I've had a small breakthrough.

The warnings were happening because I was missing libiconv, and therefore I
think it would make libintl.la static library, based on a warning I found
way up in the logfile.
I got past this by changing my make command to the following:
make CPATH=/c/Users/IEUser/libiconv-1.14/include
CPPFLAGS="-I/c/Users/IEUser/libiconv-1.14/include"
LDFLAGS="-L/c/Users/IEUser/libiconv-1.14/lib"

This gets rid of all warnings, but I still end up with a bunch of
unidentified references to:
libintl_bindtextdomain
libintl_textdomain
libintl_gettext
libintl_dgettext
libintl_sprintf

I've isolated the specific build command that's failing.  It is:
cd gettext-runtime/src
/bin/sh ../libtool --tag=CC --mode=link gcc -DINSTALLDIR=\"/usr/local/bin\"
-g -O2 -L/c/Users/IEUser/libiconv-1.14/lib -o gettext.exe gettext-gettext.o
../gnulib-lib/libgrt.a ../intl/.libs/libintl.la -liconv gettext.res

I'm not sure what's happening-- is libintl.la missing some symbols?  Or, am
I missing a flag?  I tried adding -lintl; that didn't help.

Thanks!

-John

On Mon, Jul 18, 2016 at 3:48 PM, John Harvey <john.har...@crunchydata.com>
wrote:

> Hello everyone,
>
> I'm having some build troubles, and am running out of ideas.
>
> I'm using a Windows 10 (stable) VM in Virtual box.
>
> I'm using MSYS (20111123.zip
> <https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip/download>)
> which I found here:
> https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/
>
> And, I'm using MinGW 64 which I've found here:
>
> https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/
>
> I've gotten the gettext-0.18.2 tarball, and opened it.
> After that, I've run:
> ./configure
> Once that's complete, I run a quick perl script:
> perl -p -i -e 's:void cdecl:void __cdecl:g' */*/msvc-inval.c
>
> If I don't do this, I get an error:
> gl/msvc-inval.c:124:39: error: 'gl_msvc_invalid_parameter_handler'
> undeclared (first use in this function)
> I found a few threads on it, and a patch that seems applicable:
>
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=86725346a1b116f3c2da26c124288f5f4495bf69;hp=2845ecc459a4ad03de8397a2c942c2e91d2d3ed5
> With my perl script, I've made that patch to the 3 source files, and
> things get a lot farther along, but now I have linking troubles.
>
> I think the system tries creating libgettextlib.la but while doing so, it
> throws a warning:
>  "This system can not link to static lib archive ../intl/libintl.la"
> After this, it tries to link and create libgettextlib.dll.a, and I get a
> bunch of errors (more on that later).
>
> I wanted to verify that I'm building a shared library, so for my next
> pass, since that warning has me worried.  So, I did the following:
> ./configure --enable-threads=win32 --enable-shared --enable-relocatable
>
> I found those flags on various sites.  I'm not sure if the 'relocatable'
> flag is even a thing for this build, but I'm pretty confident in the other
> two.
>
> The good news is that this time, I can tell that --enable-shared is doing
> its job because I see the following in the libgettextlib.dll.a link attempt
> (which happens just after the warning):
> libtool: link: g++ -shared
>
> Seeing that -shared flag is a good thing.  But, I'm not seeing that flag
> on the ibgettextlib.la link, which is curious to me.
>
> Since it still throws a warning, I don't really know what's wrong.  I
> would have thought that --enable-shared would fix it, so I'm confused as to
> why that isn't working in this case.
>
> Secondly, I'm confused on the error itself that I get when linking
> ibgettextlib.dll.a.
>
> That error at link time is:
> "undefined reference to libintl_gettext"
> I get a bunch of those errors all in a row, and then the link stage fails.
>
> I've tried looking around the internet for answers, but am coming up with
> answers that aren't really related to compiling gettext on Windows-- most
> threads are about compiling something else and linking gettext into it.
>
> Does anyone have any ideas as to what I need to do to make this work?
>
> Thanks!
>   -John
>

Reply via email to