Failed to build from source
aryaanlambe opened this issue · 8 comments
Tried on Ubuntu 16.04 LTS, Tried as both Sudo and Non-Sudo
Full error log is as follows:
make -C inifile
make[1]: Entering directory '/home/aryaan/Downloads/ME7Sum-master/inifile'
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Compiling inifile.c ...
x86_64-linux-gnu-gcc -Wall -O2 -g -Werror -MMD -D__GIT_VERSION="" -o inifile.o -c inifile.c
inifile.c: In function ‘list_properties’:inifile.c:281:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "[", 1);
^inifile.c:282:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, sect->name, strlen(sect->name));
^inifile.c:283:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "]\r\n", 3);
^inifile.c:288:4: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, prop->name, strlen(prop->name)); ^
inifile.c:291:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "=", 1); ^
inifile.c:292:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, prop->value, strlen(prop->value)); ^
inifile.c:294:4: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "\r\n", 2); ^
inifile.c:298:19: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
if (sect->next) write(f, "\r\n", 2);
^cc1: all warnings being treated as errors
../makefile.common:7: recipe for target 'inifile.o' failed
make[1]: *** [inifile.o] Error 1
make[1]: Leaving directory '/home/aryaan/Downloads/ME7Sum-master/inifile'
makefile.common:15: recipe for target 'inifile' failed
make: *** [inifile] Error 2
Build in a cloned repo, not the src tarball
Nope, Same Error:
aryaan@HP-250-G6:~/Downloads/ME7Sum$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
aryaan@HP-250-G6:~/Downloads/ME7Sum$ make
make -C inifile
make[1]: Entering directory '/home/aryaan/Downloads/ME7Sum/inifile'
Compiling inifile.c ...
x86_64-linux-gnu-gcc -Wall -O2 -g -Werror -MMD -D__GIT_VERSION=\"v1.0.5-3-g570f\" -o inifile.o -c inifile.c
inifile.c: In function ‘list_properties’:
inifile.c:281:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "[", 1);
^
inifile.c:282:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, sect->name, strlen(sect->name));
^
inifile.c:283:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "]\r\n", 3);
^
inifile.c:288:4: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, prop->name, strlen(prop->name));
^
inifile.c:291:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "=", 1);
^
inifile.c:292:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, prop->value, strlen(prop->value));
^
inifile.c:294:4: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(f, "\r\n", 2);
^
inifile.c:298:19: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
if (sect->next) write(f, "\r\n", 2);
^
cc1: all warnings being treated as errors
../makefile.common:7: recipe for target 'inifile.o' failed
make[1]: *** [inifile.o] Error 1
make[1]: Leaving directory '/home/aryaan/Downloads/ME7Sum/inifile'
makefile.common:15: recipe for target 'inifile' failed
make: *** [inifile] Error 2
Yea, was referring to the git warning
Looking at the other error now. Thanks for reporting the bug
works fine for me with
gcc (Debian 9.2.1-21) 9.2.1 20191130
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
However, I see why the error is triggering.
libc6-dev:
Installed: 2.29-9
Candidate: 2.29-9
Version table:
*** 2.29-9 500
500 http://deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
I have a fix but I can't verify it on my system. Can you give more information about your compiler and installed header files?