You are not logged in.

#1 2012-09-29 20:32:56

bsmith_ati
Member
Registered: 2012-09-29
Posts: 4

Cannot build gettext from ABS (gets undeclared here)

Greetings,

I am trying to build the gettext package from ABS and receive a compiler error "'gets' undeclared here". Also, I'm building for atom on an x86_64 machine

pkgver is 0.18.1.1

My command is : makepkg -Af --nocheck

Here is the output at the build break:

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I..  -I../intl -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1   -march=atom -mtune=atom -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c -o malloca.o malloca.c
In file included from fwriteerror.h:40:0,
                 from fwriteerror.c:21:
./stdio.h:456:20: error: ‘gets’ undeclared here (not in a function)
make[5]: *** [fwriteerror.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from closeout.c:22:0:
./stdio.h:456:20: error: ‘gets’ undeclared here (not in a function)
make[5]: *** [closeout.o] Error 1
In file included from localcharset.c:28:0:
./stdio.h:456:20: error: ‘gets’ undeclared here (not in a function)
make[5]: *** [localcharset.o] Error 1
make[5]: Leaving directory `/home/bsmith/src/build/core/gettext/src/gettext-0.18.1.1/gettext-runtime/gnulib-lib'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/bsmith/src/build/core/gettext/src/gettext-0.18.1.1/gettext-runtime/gnulib-lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/bsmith/src/build/core/gettext/src/gettext-0.18.1.1/gettext-runtime/gnulib-lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/bsmith/src/build/core/gettext/src/gettext-0.18.1.1/gettext-runtime'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/bsmith/src/build/core/gettext/src/gettext-0.18.1.1/gettext-runtime'
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

I have seen various reports of this same problem with other packages, such as grub, but couldn't apply the solution that was given there. Any ideas?

Thanks,
Brian Smith

Offline

#2 2012-09-29 21:14:22

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: Cannot build gettext from ABS (gets undeclared here)

bsmith_ati wrote:

I have seen various reports of this same problem with other packages, such as grub, but couldn't apply the solution that was given there.

Why?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2012-09-29 21:38:40

bsmith_ati
Member
Registered: 2012-09-29
Posts: 4

Re: Cannot build gettext from ABS (gets undeclared here)

WorMzy wrote:
bsmith_ati wrote:

I have seen various reports of this same problem with other packages, such as grub, but couldn't apply the solution that was given there.

Why?

Because the solution for grub is specific to gnu-lib code contained in the grub source package.

http://lists.gnu.org/archive/html/grub- … iHYUrM.txt

I have looked at the stdio.h and stdio.in.h files that are shipped with gettext, and do not see directives similar to what are specified in the patch for grub.

Last edited by bsmith_ati (2012-09-29 21:38:55)

Offline

#4 2012-09-29 21:57:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: Cannot build gettext from ABS (gets undeclared here)

Really? I found three instances:

wormzy@sakura[pts/5]/var/lib/archbuild/extra-x86_64/build/build/src/gettext-0.18.1.1$ find . -name "stdio.in.h" -print -exec grep "gets is" {} \;  
./gettext-tools/libgettextpo/stdio.in.h
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
./gettext-tools/gnulib-lib/stdio.in.h
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
./gettext-runtime/gnulib-lib/stdio.in.h
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

Removing these by using modified versions of the example sed line allowed me to compile the package successfully.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2012-09-29 22:12:34

bsmith_ati
Member
Registered: 2012-09-29
Posts: 4

Re: Cannot build gettext from ABS (gets undeclared here)

You are right. I can't explain why my find command didn't ferret those out. I see at least six other packages with the same problem. Thank you for your help.

Offline

#6 2012-09-29 22:24:10

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: Cannot build gettext from ABS (gets undeclared here)

They all need something like this:
https://projects.archlinux.org/svntogit … es/gettext

Check out our SVN trunk for packages in [core] - the are all fixed.

Offline

Board footer

Powered by FluxBB