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

make glib fails #204

Closed
nils-eilers opened this Issue Jun 5, 2013 · 7 comments

Comments

Projects
None yet
4 participants
@nils-eilers

nils-eilers commented Jun 5, 2013

"make" failed on compiling glib.

"make glib" gives the following output:

[build]    glib

Failed to build package glib!
  ------------------------------------------------------------
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/j/Projekte/github/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14/srclib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/j/Projekte/github/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14'
make[1]: *** [build-only-glib] Error 2
make[1]: Leaving directory `/home/j/Projekte/github/mxe'
real    0m43.574s
user    0m25.748s
sys 0m5.296s
  ------------------------------------------------------------
[log]      /home/j/Projekte/github/mxe/log/glib

make: *** [/home/j/Projekte/github/mxe/usr/installed/glib] Error 1

The log file ends with:

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -I../lib  -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1   -g -O2 -c progname.c
In file included from progname.c:26:0:
./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
make[4]: *** [progname.o] Error 1
make[4]: Leaving directory `/home/j/Projekte/github/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14/srclib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/j/Projekte/github/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14/srclib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/j/Projekte/github/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14'
make[1]: *** [build-only-glib] Error 2
make[1]: Leaving directory `/home/j/Projekte/github/mxe'

real    0m43.574s
user    0m25.748s
sys     0m5.296s

Sorry, don't know how to fix this... any ideas?

@chirlu

This comment has been minimized.

Show comment
Hide comment
@chirlu

chirlu Jun 6, 2013

Contributor

The problem is this part of srclib/stdio.in.h (a copy from gnulib) in the libiconv source:

/* It is very rare that the developer ever has full control of stdin,
   so any use of gets warrants an unconditional warning.  Assume it is
   always declared, since it is required by C89.  */
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

The assumption has become faulty, since C11 has dropped gets, and glibc has additionally dropped it for GNU sources after that. gnulib has been fixed, so the next libiconv release should be OK. A workaround would be to patch out the _GL_WARN_ON_USE (gets) in some way.

Now, one remaining question: When I do

tar xvzf ~/devel/mxe/pkg/libiconv-1.14.tar.gz
cd libiconv-1.14
./configure
make

it fails in the same way as above. When I do an MXE make glib, that works. Why?

Contributor

chirlu commented Jun 6, 2013

The problem is this part of srclib/stdio.in.h (a copy from gnulib) in the libiconv source:

/* It is very rare that the developer ever has full control of stdin,
   so any use of gets warrants an unconditional warning.  Assume it is
   always declared, since it is required by C89.  */
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

The assumption has become faulty, since C11 has dropped gets, and glibc has additionally dropped it for GNU sources after that. gnulib has been fixed, so the next libiconv release should be OK. A workaround would be to patch out the _GL_WARN_ON_USE (gets) in some way.

Now, one remaining question: When I do

tar xvzf ~/devel/mxe/pkg/libiconv-1.14.tar.gz
cd libiconv-1.14
./configure
make

it fails in the same way as above. When I do an MXE make glib, that works. Why?

@tonytheodore

This comment has been minimized.

Show comment
Hide comment
@tonytheodore

tonytheodore Jun 6, 2013

Member

When I do an MXE make glib, that works. Why?

Is it actually building the native parts? These will be skipped if the glib-* tools are already installed.

Member

tonytheodore commented Jun 6, 2013

When I do an MXE make glib, that works. Why?

Is it actually building the native parts? These will be skipped if the glib-* tools are already installed.

@chirlu

This comment has been minimized.

Show comment
Hide comment
@chirlu

chirlu Jun 6, 2013

Contributor

Right, I see this now in the cross-build macro. I do have glib-genmarshal etc. locally, so that’s indeed the reason why it works for me.

Contributor

chirlu commented Jun 6, 2013

Right, I see this now in the cross-build macro. I do have glib-genmarshal etc. locally, so that’s indeed the reason why it works for me.

@tonytheodore

This comment has been minimized.

Show comment
Hide comment
@tonytheodore

tonytheodore Jun 7, 2013

Member

A workaround would be to patch out the _GL_WARN_ON_USE (gets) in some way.

I've taken a subset of the patch mentioned and applied it also to the glib build 8e4ab07

Member

tonytheodore commented Jun 7, 2013

A workaround would be to patch out the _GL_WARN_ON_USE (gets) in some way.

I've taken a subset of the patch mentioned and applied it also to the glib build 8e4ab07

@richelbilderbeek

This comment has been minimized.

Show comment
Hide comment
@richelbilderbeek

richelbilderbeek Jun 9, 2013

Did a fresh pull, building glib still fails:

richel@richel-K73E:/opt/mxe$ sudo make glib
[build]    glib

Failed to build package glib!
------------------------------------------------------------
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14/srclib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14'
make[1]: *** [build-only-glib] Error 2
make[1]: Leaving directory `/opt/mxe'
real    1m2.534s
user    0m32.302s
sys 0m4.252s
------------------------------------------------------------
[log]      /opt/mxe/log/glib

richelbilderbeek commented Jun 9, 2013

Did a fresh pull, building glib still fails:

richel@richel-K73E:/opt/mxe$ sudo make glib
[build]    glib

Failed to build package glib!
------------------------------------------------------------
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14/srclib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/mxe/tmp-glib/glib-2.28.8.native/libiconv-1.14'
make[1]: *** [build-only-glib] Error 2
make[1]: Leaving directory `/opt/mxe'
real    1m2.534s
user    0m32.302s
sys 0m4.252s
------------------------------------------------------------
[log]      /opt/mxe/log/glib
@tonytheodore

This comment has been minimized.

Show comment
Hide comment
@tonytheodore

tonytheodore Jun 9, 2013

Member

Okay, I cherry-picked the fix into stable 7e231ef

BTW, I'd strongly recommend against using sudo.

Member

tonytheodore commented Jun 9, 2013

Okay, I cherry-picked the fix into stable 7e231ef

BTW, I'd strongly recommend against using sudo.

@richelbilderbeek

This comment has been minimized.

Show comment
Hide comment
@richelbilderbeek

richelbilderbeek Jun 9, 2013

Build succeeds. Thanks tonytheodore!

BTW, I use sudo only for MXE, no good reason why, except for that the tutorial uses /opt/mxe: I too strongly recommend against using it.

richelbilderbeek commented Jun 9, 2013

Build succeeds. Thanks tonytheodore!

BTW, I use sudo only for MXE, no good reason why, except for that the tutorial uses /opt/mxe: I too strongly recommend against using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment