Opened 8 years ago

Closed 3 years ago

#7506 closed defect (moved_to_github)

miniupnpd.c redefinition of 'struct option'

Reported by: moo <moo.tinys@…> Owned by: cshore
Priority: response-needed Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: miniupnpd Cc:


$ LANG=C svn info feeds/packages/*/*miniu*
Path: feeds/packages/net/miniupnpd
URL: svn://
Repository Root: svn://
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 21878
Node Kind: directory
Schedule: normal
Last Changed Author: cshore
Last Changed Rev: 20634
Last Changed Date: 2010-03-31 18:36:16 +0800 (Wed, 31 Mar 2010)
$ make BUILD_LOG=1
$ cat logs/package/feeds/packages/miniupnpd/compile.txt
make[4]: Entering directory `/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/miniupnpd-1.4'
i486-openwrt-linux-gnu-gcc -O2 -ggdb -pipe -march=pentium3 -funit-at-a-time -fhonour-copts -I/home/moo/src/openwrt-trunk/staging_dir/target-i386_glibc-2.7/usr/include -I/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/iptables-1.4.8/include -DIPTABLES_143   -c -o miniupnpd.o miniupnpd.c
In file included from miniupnpd.c:43:
options.h:65: error: redefinition of 'struct option'
make[4]: *** [miniupnpd.o] Error 1
make[4]: Leaving directory `/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/miniupnpd-1.4'
make[3]: *** [/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/miniupnpd-1.4/.built] Error 2

Attachments (1)

.config (124.2 KB) - added by moo.tinys@… 7 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by jow

  • Owner changed from developers to cshore
  • Status changed from new to assigned

comment:2 Changed 8 years ago by cshore

  • Resolution set to worksforme
  • Status changed from assigned to closed

Works for me for trunk

comment:3 Changed 7 years ago by moo.tinys@…

  • Resolution worksforme deleted
  • Status changed from closed to reopened
make: Entering directory `/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/miniupnpd-1.4'
ccache i486-openwrt-linux-gnu-gcc -O2 -ggdb -pipe -march=pentium3 -funit-at-a-time -fhonour-copts -I/home/moo/src/openwrt-trunk/staging_dir/target-i386_glibc-2.7/usr/include -I/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/iptables- -DIPTABLES_143   -c -o miniupnpd.o miniupnpd.c
In file included from miniupnpd.c:43:0:
options.h:64:8: error: redefinition of 'struct option'
/home/moo/src/openwrt-trunk/staging_dir/target-i386_glibc-2.7/usr/include/getopt.h:82:8: note: originally defined here
make: *** [miniupnpd.o] Error 1
make: Leaving directory `/home/moo/src/openwrt-trunk/build_dir/linux-x86_generic/miniupnpd-1.4'

the include stack is, from miniupnpd.c at line "#include <unistd.h>", then unistd.h

#ifdef  __USE_POSIX2
/* Get definitions and prototypes for functions to process the
   arguments in ARGV (ARGC of them, minus the program name) for
   options given in OPTS.  */
# define __need_getopt
# include <getopt.h>
}}}and inside getopt.h there is a struct option definition like the error message. i don't know how to make it reproduce in your env, but pls be aware the target i'm using

ls staging_dir/
host/  target-i386_glibc-2.7/  toolchain-i386_gcc-4.5.1_glibc-2.7/

comment:4 Changed 7 years ago by anonymous

Can you please detail your build options and target? I think you're using something different than the usual environment, but you haven't specified what you're using.

For instance I see glibc... are you using glibc instead of uclibc? target i386?
Anything else different from defaults?

Changed 7 years ago by moo.tinys@…

comment:5 Changed 7 years ago by cshore

  • Owner changed from cshore to thepeople
  • Priority changed from normal to response-needed
  • Status changed from reopened to assigned

Uhmm. A dump of file that is mostly intended for a machine to read isn't very helpful. It would be much more in line with the amount of time anyone is likely to have to dedicate this if you were to provide as much already done work as possible. Like a summary of your changes from defaults. A patch would be even better.

Also, so you know, glibc is not supported and is only dealt with on an as-time-available basis, at low priority.

P.S. thepeople, how do I assign this back to developers?

comment:6 Changed 7 years ago by cshore

  • Owner changed from thepeople to cshore
  • Status changed from assigned to accepted

ok, miniupnpd has been update since your report. Is this still a problem?

comment:7 Changed 7 years ago by cshore

btw, sorry, I was just swamped

comment:8 Changed 6 years ago by rossb@…

also ran into this.

The problem is a name conflict in:

struct option
        enum upnpconfigoptions id;
        char value[MAX_OPTION_VALUE_LEN];


struct option
#if defined (__STDC__) && __STDC__
  const char *name;
  char *name;
  /* has_arg can't be an enum because some compilers complain about
     type mismatches in all the code that assumes it is an int.  */
  int has_arg;
  int *flag;
  int val;

...making the package useless until struct option is package globally renamed to something else.

comment:9 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:10 Changed 3 years ago by jogo

  • Resolution set to moved_to_github
  • Status changed from accepted to closed

miniupnpd has been updated and moved to If this is still an issue, please open a ticket there.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.