Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 833866

Summary: dev-libs/cereal-1.3.1-r1[test]: unrecognized command-line option ‘-m32’
Product: Gentoo Linux Reporter: Alex Fan <alex.fan.q>
Component: Current packagesAssignee: 3D Printing Team <3dprint>
Status: CONFIRMED ---    
Severity: normal Keywords: PullRequest
Priority: Normal    
Version: unspecified   
Hardware: riscv   
OS: Linux   
URL: https://github.com/USCiLab/cereal/issues/258
See Also: https://github.com/gentoo/gentoo/pull/24309
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 887495    
Bug Blocks: 833815    
Attachments: cereal-1.3.1-r1-fix-m32-flag.patch
cereal-1.3.1-r1:20220222-104508.log

Description Alex Fan archtester 2022-02-22 04:56:25 UTC
failed on riscv with:

FAILED: unittests/CMakeFiles/test_forward_list_32.dir/forward_list.cpp.o                                             
/usr/bin/riscv64-unknown-linux-gnu-g++  -I/var/tmp/portage/dev-libs/cereal-1.3.1-r1/work/cereal-1.3.1/include  -O2 -p
ipe -m32 -Wall -Wextra -pedantic -Wshadow -Wold-style-cast -std=gnu++11 -MD -MT unittests/CMakeFiles/test_forward_lis
t_32.dir/forward_list.cpp.o -MF unittests/CMakeFiles/test_forward_list_32.dir/forward_list.cpp.o.d -o unittests/CMake
Files/test_forward_list_32.dir/forward_list.cpp.o -c /var/tmp/portage/dev-libs/cereal-1.3.1-r1/work/cereal-1.3.1/unit
tests/forward_list.cpp                                                                                               
riscv64-unknown-linux-gnu-g++: error: unrecognized command-line option ‘-m32’


if SKIP_PORTABILITY_TEST is OFF, all 32 bits tests requiring -m32 are enabled. riscv and arm gcc don't support -m32 or -m64.

Reproducible: Always
Comment 1 Alex Fan archtester 2022-02-22 05:00:58 UTC
Created attachment 765596 [details, diff]
cereal-1.3.1-r1-fix-m32-flag.patch

This should detect compiler support -m32 and disable 32bits tests
Comment 2 Alex Fan archtester 2022-02-22 05:02:12 UTC
Created attachment 765597 [details]
cereal-1.3.1-r1:20220222-104508.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-22 05:09:40 UTC
(In reply to Alex Fan from comment #1)
> Created attachment 765596 [details, diff] [details, diff]
> cereal-1.3.1-r1-fix-m32-flag.patch
> 
> This should detect compiler support -m32 and disable 32bits tests

Can you send this upstream?
Comment 4 Alex Fan archtester 2022-02-22 05:14:50 UTC
(In reply to Sam James from comment #3)
> Can you send this upstream?
Sure, will do.

In addition, there is another issue. riscv ld reports creating DT_TEXTREL in a PIE for all test objects. It is not harmful or related to this library, likely the same bug of https://bugs.gentoo.org/713082
 
example:
shell# scanelf -qT test_portable_binary_archive

test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0]
  test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0]
  test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0]
  test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0]
  test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0](In reply to Sam James from comment #3)
Comment 5 Alex Fan archtester 2022-02-22 05:27:50 UTC
(In reply to Sam James from comment #3)
> (In reply to Alex Fan from comment #1)
> > Created attachment 765596 [details, diff] [details, diff] [details, diff]
> > cereal-1.3.1-r1-fix-m32-flag.patch
> > 
> > This should detect compiler support -m32 and disable 32bits tests
> 
> Can you send this upstream?

Oh sorry, there was an issue already where upstream suggests passing -DSKIP_PORTABILITY_TEST=ON