Skip to content
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

Error: Make of GNU sort failed #1

Open
CRD44 opened this issue Dec 15, 2017 · 6 comments
Open

Error: Make of GNU sort failed #1

CRD44 opened this issue Dec 15, 2017 · 6 comments

Comments

@CRD44
Copy link

CRD44 commented Dec 15, 2017

Hi,
I am trying to install orderedPainting, but when I run the setup.sh script I get the following error:

In file included from /home/c/cd277/.linuxbrew/include/sys/types.h:219:0,
from ./stdio.h:60,
from argv-iter.h:17,
from argv-iter.c:20:
./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
make[2]: *** [argv-iter.o] Error 1
make[2]: Leaving directory /home/c/cd277/bin/orderedPainting/coreutils-8.11/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /home/c/cd277/bin/orderedPainting/coreutils-8.11/lib'
make: *** [all] Error 2
GEN version.h
CC sort.o
In file included from /home/c/cd277/.linuxbrew/include/getopt.h:33:0,
from sort.c:25:
../lib/stdio.h:496:1: error: 'gets' undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
make: *** [sort.o] Error 1
20171215_090104 Make of GNU sort failed

Do you know a way I can fix this problem?

@CFGrote
Copy link

CFGrote commented Dec 17, 2024

Same problem here. Would be great to have more information on the build system used, @bioprojects (gcc version, glibc version, libstdc++ version etc.)

@bioprojects
Copy link
Owner

I have confirmed the error (that happens during complication of GNU sort), and fixed it by modifying and committing setup.sh.

Please try the following (included in the modified setup.sh):

URL=http://ftp.gnu.org/gnu/coreutils/coreutils-8.11.tar.gz
wget ${URL}
if [ $? -ne 0 ]; then
echo_fail "Download failed. Please check the URL: ${URL}"
fi

tar xvfz coreutils-8.11.tar.gz
cd coreutils-8.11
CC=gcc
./configure CFLAGS=-O3
cd ./lib
perl -i -pe 's/_GL_WARN_ON_USE (gets, ///_GL_WARN_ON_USE (gets/g' stdio.h
make
cd ../src
make version.h
make sort

@CFGrote
Copy link

CFGrote commented Dec 17, 2024

thanks @bioprojects for the quick response. I will try your suggested fix.

May I ask, why does the project depend on this particular version of coreutils? Are other versions (of sort) leading to errors? Maybe this can be fixed upstream?

@bioprojects
Copy link
Owner

bioprojects commented Dec 18, 2024

During the development of orderedPainting, I tested only version 8.11 of GNU sort,
but newer versions would also work.

@CFGrote
Copy link

CFGrote commented Dec 19, 2024

I checked with version 9.1 which seems to be working ok.

@CFGrote
Copy link

CFGrote commented Dec 19, 2024

imho, we can close this issue, thanks again @bioprojects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants