You are not logged in.

#1 2013-09-08 23:27:55

z1lt0id
Member
Registered: 2012-09-20
Posts: 177

Handbrake-SVN doesn't compile

I've tried compiling Handbrake via AUR and manually but I keep running into this error.

make[4]: Entering directory `/home/dean/hb-trunk/build/contrib/m4/m4-1.4.16/lib'
\
#	source='gl_avltree_oset.c' object='gl_avltree_oset.o' libtool=no 
/usr/bin/gcc -std=gnu99  -I.   -I/home/dean/hb-trunk/build/contrib/include   -I/home/dean/hb-trunk/build/contrib/include  -c gl_avltree_oset.c
\
#	source='c-ctype.c' object='c-ctype.o' libtool=no 
/usr/bin/gcc -std=gnu99  -I.   -I/home/dean/hb-trunk/build/contrib/include   -I/home/dean/hb-trunk/build/contrib/include  -c c-ctype.c
\
#	source='c-stack.c' object='c-stack.o' libtool=no 
/usr/bin/gcc -std=gnu99  -I.   -I/home/dean/hb-trunk/build/contrib/include   -I/home/dean/hb-trunk/build/contrib/include  -c c-stack.c
\
#	source='clean-temp.c' object='clean-temp.o' libtool=no 
/usr/bin/gcc -std=gnu99  -I.   -I/home/dean/hb-trunk/build/contrib/include   -I/home/dean/hb-trunk/build/contrib/include  -c clean-temp.c
In file included from clean-temp.h:22:0,
                 from clean-temp.c:23:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 ^
make[4]: *** [clean-temp.o] Error 1
make[4]: Leaving directory `/home/dean/hb-trunk/build/contrib/m4/m4-1.4.16/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/dean/hb-trunk/build/contrib/m4/m4-1.4.16/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dean/hb-trunk/build/contrib/m4/m4-1.4.16'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/dean/hb-trunk/build/contrib/m4/m4-1.4.16'
make: *** [contrib/m4/.stamp.build] Error 2

Any thoughts on why this would be happening?

Offline

#2 2013-09-09 14:51:53

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Handbrake-SVN doesn't compile

make is a pretty friendly app once you get to know it a bit.
The bit about the error is easy to find.

In file included from clean-temp.h:22:0,
                 from clean-temp.c:23:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

What's the file named on line 22 of clean-temp.h ? (first line above).
I don't think it is /usr/include/stdio.h as gets is on a different line here.

└──╼ grep -nw 'gets' /usr/include/stdio.h 
638:extern char *gets (char *__s) __wur __attribute_deprecated__;

Like the error says (line 3 above), _GL_WARN_ON_USE (line 4 above) and the return from grepping /usr/include/stdio.h says, 'gets' can't be used anymore. It's a security hole and is deprecated.

There's a few different ways you can go from here:
    . Wait 'till it's sorted.
    . File a bug report with handbrake.
    . Read 'man fgets' and change the included file, if it's not /usr/include/stdio.h, to handle any other calls to 'gets' from that file.You'll have to change any calls to 'gets' over to fgets to stop gcc giving warnings (grep -rnw 'gets' /the/build/directory). Test it and see it builds and works ok. Then you can send a patch upstream to contribute if you want.

If you make backups, editing a couple/few files is only scary the first time.

tl;dr yes I have a thought or two.


You're just jealous because the voices only talk to me.

Offline

Board footer

Powered by FluxBB