Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777444 - dev-util/babeltrace-1.2.4 multiple definition of `bt_lookup_format' when using rlibtool
Summary: dev-util/babeltrace-1.2.4 multiple definition of `bt_lookup_format' when usin...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: slibtool
  Show dependency tree
 
Reported: 2021-03-21 01:23 UTC by Alessandro Barbieri
Modified: 2021-04-13 19:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
babeltrace-1.2.4:20210321-012018.log (babeltrace-1.2.4:20210321-012018.log,245.46 KB, text/plain)
2021-03-21 01:23 UTC, Alessandro Barbieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-03-21 01:23:14 UTC
In file included from /usr/include/glib-2.0/glib/gdir.h:32,                                                                                                                                                                                   
                 from /usr/include/glib-2.0/glib.h:45,                                                                                                                                                                                        
                 from ../../include/babeltrace/types.h:39,                                                                                                                                                                                    
                 from ../../include/babeltrace/ctf/types.h:30,                                                                                                                                                                                
                 from ctf.c:30:                                                                                                                                                                                                               
/usr/include/dirent.h:183:12: note: declared here                                                                                                                                                                                             
  183 | extern int readdir_r (DIR *__restrict __dirp,                                                                                                                                                                                         
      |            ^~~~~~~~~                                                                                                                                                                                                                  
rlibtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -Wall -Wformat -include config.h -I../../include -Os -pipe -march=native -fdiagnostics-color=
always -Os -pipe -march=native -fdiagnostics-color=always -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,--no-as-needed -version-info 1:0:0 -Wl,-O1 -Wl,--as-needed -o libbabeltrace-ctf.la -rpath /usr/lib64 ct
f.lo events.lo iterator.lo callbacks.lo ../../lib/libbabeltrace.la types/libctf-types.la metadata/libctf-parser.la metadata/libctf-ast.la writer/libctf-writer.la -lpopt  -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0              
rlibtool: lconf: {.name="libtool"}.                                                                                                                                                                                                           
rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/dev-util/babeltrace-1.2.4/work/babeltrace-1.2.4/formats/ctf"}.                                                                                                                 
rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 40, .st_ino = 9627}.                                                                                                                                                                
rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = -1 [ENOENT].                                                                                                                                                                         
rlibtool: lconf: openat(AT_FDCWD,"../",O_DIRECTORY,0) = 5.                                                                                                                                                                                    
rlibtool: lconf: fstat(5,...) = 0 {.st_dev = 40, .st_ino = 9617}.                                                                                                                                                                             
rlibtool: lconf: openat(5,"libtool",O_RDONLY,0) = -1 [ENOENT].                                                                                                                                                                                
rlibtool: lconf: openat(5,"../",O_DIRECTORY,0) = 6.                                                                                                                                                                                           
rlibtool: lconf: fstat(6,...) = 0 {.st_dev = 40, .st_ino = 9596}.                                                                                                                                                                             
rlibtool: lconf: openat(6,"libtool",O_RDONLY,0) = 5.                                                                                                                                                                                          
rlibtool: lconf: found "/var/tmp/portage/dev-util/babeltrace-1.2.4/work/babeltrace-1.2.4/libtool".                                                                                                                                            
rlibtool: link: ar crs .libs/libbabeltrace-ctf.a .libs/ctf.o .libs/events.o .libs/iterator.o .libs/callbacks.o                                                                                                                                
rlibtool: link: x86_64-pc-linux-gnu-gcc .libs/ctf.o .libs/events.o .libs/iterator.o .libs/callbacks.o -Wl,--whole-archive types/.libs/libctf-types.a -Wl,--no-whole-archive -Wl,--whole-archive metadata/.libs/libctf-parser.a -Wl,--no-whole-
archive -Wl,--whole-archive metadata/.libs/libctf-ast.a -Wl,--no-whole-archive -Wl,--whole-archive writer/.libs/libctf-writer.a -Wl,--no-whole-archive -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4
 -Wall -Wformat -include config.h -I../../include -Os -pipe -march=native -fdiagnostics-color=always -Os -pipe -march=native -fdiagnostics-color=always -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,--no-as-n
eeded -Wl,-O1 -Wl,--as-needed -L../../lib/.libs -lbabeltrace -lpopt -lgmodule-2.0 -lglib-2.0 -lpopt -lgmodule-2.0 -Ltypes/../../../lib/.libs -lbabeltrace -Lmetadata/../../../lib/.libs -luuid -lpopt -lgmodule-2.0 -lglib-2.0 -Lwriter/../../
../lib/.libs -lbabeltrace -Wl,--export-dynamic -pthread -shared -fPIC -Wl,-soname -Wl,libbabeltrace-ctf.so.1 -o .libs/libbabeltrace-ctf.so.1.0.0                                                                                              
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(registry.o): in function `bt_lookup_format':                                                                                      
registry.c:(.text+0x57): multiple definition of `bt_lookup_format'; types/.libs/libctf-types.a(registry.o):registry.c:(.text+0x57): first defined here                                                                                        
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(registry.o): in function `bt_fprintf_format_list':                                                                                
registry.c:(.text+0x72): multiple definition of `bt_fprintf_format_list'; types/.libs/libctf-types.a(registry.o):registry.c:(.text+0x72): first defined here                                                                                  
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(registry.o): in function `bt_unregister_format':                                                                                  
registry.c:(.text+0x12b): multiple definition of `bt_unregister_format'; types/.libs/libctf-types.a(registry.o):registry.c:(.text+0x12b): first defined here                                                                                  
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(registry.o): in function `bt_register_format':                                                                                    
registry.c:(.text+0x16f): multiple definition of `bt_register_format'; types/.libs/libctf-types.a(registry.o):registry.c:(.text+0x16f): first defined here                                                                                    
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-collection.o): in function `bt_trace_collection_add':                                                                       
trace-collection.c:(.text+0x24f): multiple definition of `bt_trace_collection_add'; types/.libs/libctf-types.a(trace-collection.o):trace-collection.c:(.text+0x24f): first defined here                                                       
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-collection.o): in function `bt_trace_collection_remove':                                                                    
trace-collection.c:(.text+0x34c): multiple definition of `bt_trace_collection_remove'; types/.libs/libctf-types.a(trace-collection.o):trace-collection.c:(.text+0x34c): first defined here                                                    
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-collection.o): in function `bt_init_trace_collection':                                                                      
trace-collection.c:(.text+0x371): multiple definition of `bt_init_trace_collection'; types/.libs/libctf-types.a(trace-collection.o):trace-collection.c:(.text+0x371): first defined here                                                      
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-collection.o): in function `bt_finalize_trace_collection':                                                                  
trace-collection.c:(.text+0x3d9): multiple definition of `bt_finalize_trace_collection'; types/.libs/libctf-types.a(trace-collection.o):trace-collection.c:(.text+0x3d9): first defined here                                                  
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-handle.o): in function `bt_trace_handle_create':                                                                            
trace-handle.c:(.text+0x0): multiple definition of `bt_trace_handle_create'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x0): first defined here                                                                        
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-handle.o): in function `bt_trace_handle_destroy':                                                                           
trace-handle.c:(.text+0x2c): multiple definition of `bt_trace_handle_destroy'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x2c): first defined here                                                                     
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-handle.o): in function `bt_trace_handle_get_path':                                                                          
trace-handle.c:(.text+0x31): multiple definition of `bt_trace_handle_get_path'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x31): first defined here                                                                    
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-handle.o): in function `bt_trace_handle_get_timestamp_begin':                                                               
trace-handle.c:(.text+0x55): multiple definition of `bt_trace_handle_get_timestamp_begin'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x55): first defined here                                                         
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(trace-handle.o): in function `bt_trace_handle_get_timestamp_end':                                                                 
trace-handle.c:(.text+0x94): multiple definition of `bt_trace_handle_get_timestamp_end'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x94): first defined here                                                           
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: metadata/.libs/libctf-ast.a(context.o): in function `bt_context_create':                                                                                      
context.c:(.text+0x4b): multiple definition of `bt_context_create'; types/.libs/libctf-types.a(context.o):context.c:(.text+0x4b): first defined here
Comment 1 Alessandro Barbieri 2021-03-21 01:23:35 UTC
Created attachment 692625 [details]
babeltrace-1.2.4:20210321-012018.log

buildlog
Comment 2 orbea 2021-03-22 17:00:43 UTC
babeltrace-1.2.4 is from 2016 and this has been fixed upstream since their v2.0.1 git tag, their most recent tag v2.0.4 also works as does their current git HEAD.

Just update babeltrace to fix this.
Comment 3 Ionen Wolkens gentoo-dev 2021-04-13 14:59:21 UTC
wrt -fno-common blocker note that -fcommon doesn't seem to fix this and it only happens with slibtool, so believe it's mostly something different.

These will mention static libraries for the first definition, e.g.

trace-handle.c:(.text+0x55): multiple definition of `bt_trace_handle_get_timestamp_begin'; types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x55): first defined here
Comment 4 Sam James archtester gentoo-dev Security 2021-04-13 15:35:32 UTC
(In reply to Ionen Wolkens from comment #3)
> wrt -fno-common blocker note that -fcommon doesn't seem to fix this and it
> only happens with slibtool, so believe it's mostly something different.
> 
> These will mention static libraries for the first definition, e.g.
> 
> trace-handle.c:(.text+0x55): multiple definition of
> `bt_trace_handle_get_timestamp_begin';
> types/.libs/libctf-types.a(trace-handle.o):trace-handle.c:(.text+0x55):
> first defined here

Good point!
Comment 5 orbea 2021-04-13 18:55:23 UTC
There is little point worrying about it when all this needs is a version bump.
Comment 6 Ionen Wolkens gentoo-dev 2021-04-13 19:13:05 UTC
(In reply to orbea from comment #5)
> There is little point worrying about it when all this needs is a version
> bump.
Was speaking generally because this isn't the only one, like bug #778248, and it's useful to be able to identify them.