Confused about submitting reply to a debian bug
by Subhraman Sarkar from LinuxQuestions.org on (#57NK3)
Hello,
I was using the packge Code:binfmtc, Version 0.17-2 in Ubuntu 20.04, and when I run the command Code:realcsh.c, I get this
Code:realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccouPJkF.o: in function `main':
/usr/bin/realcsh.c:64: undefined reference to `readline'
/usr/bin/ld: /usr/bin/realcsh.c:72: undefined reference to `add_history'
collect2: error: ld returned 1 exit status
binfmtc: Compilation failed for /usr/bin/realcsh.c, see above messages for details.
Searching in the internet, I found out that this is a bug reported here.
This thread has no replies, but I think I have figured out a solution to this bug. If you set the debug variable BINFMTC_DEBUG to 1 by,
Code:export BINFMTC_DEBUG=1 I see that the complete gcc command executed is,
Code:gcc -o /tmp/binfmtcaszLYb -x c -lreadline -I/usr/include/readline -O2 -Wall -g "realcsh.c". See debug output below :
Code:binfmtc: Execute command-line: gcc -o /tmp/binfmtcaszLYb -x c -lreadline -I/usr/include/readline -O2 -Wall -g "realcsh.c"
realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccJmIfxj.o: in function `main':
/usr/bin/realcsh.c:64: undefined reference to `readline'
/usr/bin/ld: /usr/bin/realcsh.c:72: undefined reference to `add_history'
collect2: error: ld returned 1 exit status
binfmtc: Compilation failed for /usr/bin/realcsh.c, see above messages for detailsThe problem is that the gcc command used to compile should be :
Code:gcc -x c -O2 -Wall -g "realcsh.c" -lreadline -I/usr/include/readline -o /tmp/binfmtcisgpL7.
I have a modified version that works as intended, albeit some warnings :
Code:$ ./binfmtc-interpreter /usr/bin/realcsh.c
binfmtc: Execute command-line: gcc -x c -O2 -Wall -g "realcsh.c" -lreadline -I/usr/include/readline -o /tmp/binfmtcisgpL7
binfmtc: compiler : gcc
binfmtc: language : -x c
binfmtc: default options : -O2 -Wall -g
binfmtc: file options : -lreadline -I/usr/include/readline
binfmtc: source file : realcsh.c
realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
REAL csh:My problem is that I don't know how to let them (Debian Bug Tracking System) know that I have a solution. What steps I should take to let them know this?
Should I just use the Reply button in the Bug page? Are there any additional rules? (There are lots of rules for bug submission, I believe). I am pretty new to bugs and sorry if this sounds silly!
Thanks a lot in advance.


I was using the packge Code:binfmtc, Version 0.17-2 in Ubuntu 20.04, and when I run the command Code:realcsh.c, I get this
Code:realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccouPJkF.o: in function `main':
/usr/bin/realcsh.c:64: undefined reference to `readline'
/usr/bin/ld: /usr/bin/realcsh.c:72: undefined reference to `add_history'
collect2: error: ld returned 1 exit status
binfmtc: Compilation failed for /usr/bin/realcsh.c, see above messages for details.
Searching in the internet, I found out that this is a bug reported here.
This thread has no replies, but I think I have figured out a solution to this bug. If you set the debug variable BINFMTC_DEBUG to 1 by,
Code:export BINFMTC_DEBUG=1 I see that the complete gcc command executed is,
Code:gcc -o /tmp/binfmtcaszLYb -x c -lreadline -I/usr/include/readline -O2 -Wall -g "realcsh.c". See debug output below :
Code:binfmtc: Execute command-line: gcc -o /tmp/binfmtcaszLYb -x c -lreadline -I/usr/include/readline -O2 -Wall -g "realcsh.c"
realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccJmIfxj.o: in function `main':
/usr/bin/realcsh.c:64: undefined reference to `readline'
/usr/bin/ld: /usr/bin/realcsh.c:72: undefined reference to `add_history'
collect2: error: ld returned 1 exit status
binfmtc: Compilation failed for /usr/bin/realcsh.c, see above messages for detailsThe problem is that the gcc command used to compile should be :
Code:gcc -x c -O2 -Wall -g "realcsh.c" -lreadline -I/usr/include/readline -o /tmp/binfmtcisgpL7.
I have a modified version that works as intended, albeit some warnings :
Code:$ ./binfmtc-interpreter /usr/bin/realcsh.c
binfmtc: Execute command-line: gcc -x c -O2 -Wall -g "realcsh.c" -lreadline -I/usr/include/readline -o /tmp/binfmtcisgpL7
binfmtc: compiler : gcc
binfmtc: language : -x c
binfmtc: default options : -O2 -Wall -g
binfmtc: file options : -lreadline -I/usr/include/readline
binfmtc: source file : realcsh.c
realcsh.c: In function main':
realcsh.c:96:7: warning: ignoring return value of asprintf', declared with attribute warn_unused_result [-Wunused-result]
96 | asprintf(&tempfilename, "%s/realcshXXXXXX",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | getenv("BINFMTCTMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~~~~~~~
98 | getenv("TMPDIR")?:
| ~~~~~~~~~~~~~~~~~~
99 | getenv("TEMPDIR")?:
| ~~~~~~~~~~~~~~~~~~~
100 | "/tmp"
| ~~~~~~
101 | );
| ~
realcsh.c:126:7: warning: ignoring return value of system', declared with attribute warn_unused_result [-Wunused-result]
126 | system (tempfilename);
| ^~~~~~~~~~~~~~~~~~~~~
REAL csh:My problem is that I don't know how to let them (Debian Bug Tracking System) know that I have a solution. What steps I should take to let them know this?
Should I just use the Reply button in the Bug page? Are there any additional rules? (There are lots of rules for bug submission, I believe). I am pretty new to bugs and sorry if this sounds silly!
Thanks a lot in advance.