pinfo icon indicating copy to clipboard operation
pinfo copied to clipboard

Duplicate declaration of 'extern int use_manual'

Open lechner opened this issue 2 years ago • 2 comments

Hi,

A packaging effort of the most recent commit in Guix resulted in the error below.

I believe, but did not confirm, that the conflicting symbol definitions are caused by the duplicated declaration of extern int use_manual in datatypes.h and parse_config.h. Both files are included everywhere via common_includes.h, so I might personally attempt to remove one of the declarations.

Thanks for maintaining this software!

Kind regards, Felix Lechner

/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash ../libtool  --tag=CC   --mode=link gcc -D_GNU_SOURCE  -D_XOPEN_SOURCE=600  -Wall -Wextra -Wshadow  -DLOCALEDIR=\"/gnu/store/5z12c5zw9sy8m732xhilnpj40318g9h0-pinfo-0.6.13/share/locale\" -DCONFIGDIR=\"/gnu/store/5z12c5zw9sy8m732xhilnpj40318g9h0-pinfo-0.6.13/etc/pinforc\" -g -O2  -D_XOPEN_SOURCE=600   -o pinfo pinfo-pinfo.o pinfo-colors.o pinfo-datatypes.o pinfo-filehandling_functions.o pinfo-mainfunction.o pinfo-manual.o pinfo-menu_and_note_utils.o pinfo-parse_config.o pinfo-regexp_search.o pinfo-signal_handler.o pinfo-utils.o pinfo-video.o pinfo-initializelinks.o pinfo-printinfo.o readlinewrapper.o     -lncursesw 
libtool: link: gcc -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -Wall -Wextra -Wshadow -DLOCALEDIR=\"/gnu/store/5z12c5zw9sy8m732xhilnpj40318g9h0-pinfo-0.6.13/share/locale\" -DCONFIGDIR=\"/gnu/store/5z12c5zw9sy8m732xhilnpj40318g9h0-pinfo-0.6.13/etc/pinforc\" -g -O2 -D_XOPEN_SOURCE=600 -o pinfo pinfo-pinfo.o pinfo-colors.o pinfo-datatypes.o pinfo-filehandling_functions.o pinfo-mainfunction.o pinfo-manual.o pinfo-menu_and_note_utils.o pinfo-parse_config.o pinfo-regexp_search.o pinfo-signal_handler.o pinfo-utils.o pinfo-video.o pinfo-initializelinks.o pinfo-printinfo.o readlinewrapper.o  -lncursesw
ld: pinfo-colors.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-datatypes.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-filehandling_functions.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-mainfunction.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-manual.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-menu_and_note_utils.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-parse_config.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-regexp_search.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-signal_handler.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-utils.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-video.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-initializelinks.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: pinfo-printinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
ld: readlinewrapper.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: multiple definition of `use_manual'; pinfo-pinfo.o:/tmp/guix-build-pinfo-0.6.13.drv-0/source/src/parse_config.h:88: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:527: pinfo] Error 1
make[2]: Leaving directory '/tmp/guix-build-pinfo-0.6.13.drv-0/source/src'
make[1]: *** [Makefile:477: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-pinfo-0.6.13.drv-0/source'
make: *** [Makefile:407: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "8") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 2.1 seconds
command "make" "-j" "8" failed with status 2

lechner avatar Jun 16 '22 04:06 lechner

Minor correction: The most recently tagged version fails to compile, not the latest commit; it works fine, and I've sent a patch to Guix to update its pinfo package to that.

unmatched-paren avatar Jun 16 '22 06:06 unmatched-paren

I believe this was indeed fixed in fc4ad0b720894b25bf9037301a139c50759253ee.

jwilk avatar Oct 10 '22 07:10 jwilk