Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833866 - dev-libs/cereal-1.3.1-r1[test]: unrecognized command-line option ‘-m32’
Summary: dev-libs/cereal-1.3.1-r1[test]: unrecognized command-line option ‘-m32’
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: 3D Printing Team
URL: https://github.com/USCiLab/cereal/iss...
Whiteboard:
Keywords: PullRequest
Depends on: 887495
Blocks: 833815
  Show dependency tree
 
Reported: 2022-02-22 04:56 UTC by Alex Fan
Modified: 2022-12-20 19:01 UTC (History)
0 users

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


Attachments
cereal-1.3.1-r1-fix-m32-flag.patch (cereal-1.3.1-r1-fix-m32-flag.patch,435 bytes, patch)
2022-02-22 05:00 UTC, Alex Fan
Details | Diff
cereal-1.3.1-r1:20220222-104508.log (cereal-1.3.1-r1:20220222-104508.log,27.99 KB, text/plain)
2022-02-22 05:02 UTC, Alex Fan
Details

Note You need to log in before you can comment on or make changes to this bug.
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