Fri 25 Oct 2013 04:05:40 AM UTC, original submission:
The C example that come with my Debian/Ubuntu package gave me segmentation fault error, after successfully compile into binary.
Here are my steps, will file another bug report after I go home tonight:
Generate:
gengetopt --input=./sample2.ggo --func-name=my_cmdline_parser
--file-name=cmdline2 --unamed-opts --no-handle-help --no-handle-version
Compile:
gcc -DPACKAGE='"cmdline2"' -DVERSION="1.1" -o main2 main2.c cmdline2.c
Run:
$ main2
main2: '--int-opt' ('-i') option required
main2: '--long-opt' ('-l') option required
$ main2 -i 3 -l 5
$ main2 -h
This is a simple test for gengetopt
Segmentation fault
^^^^^^^^^^^^^^^^^
More details at http://lists.gnu.org/archive/html/help-gengetopt/2013-10/msg00007.html
My OS is Ubuntu 13.10, with the vanilla official kernel:
NAME="Ubuntu"
VERSION="13.10, Saucy Salamander"
$ cat /proc/version
Linux version 3.9.0-1-generic (address@hidden) (gcc version 4.8.0 (Ubuntu
4.8.0-6ubuntu1) ) #5-Ubuntu SMP Wed May 8 20:52:54 UTC 2013
$ uname -rsm
Linux 3.9.0-1-generic i686
$ apt-cache policy gcc
gcc:
Installed: 4:4.8.0-0ubuntu13
Candidate: 4:4.8.1-2ubuntu3
Version table:
4:4.8.1-2ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ saucy/main i386 Packages
100 /var/lib/dpkg/status
|