Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/hyperscan: bug fixes & version bump #15681

Closed
wants to merge 3 commits into from

Conversation

arkamar
Copy link
Member

@arkamar arkamar commented May 7, 2020

This PR fixes both open bugs for dev-libs/hyperscan.

@gentoo-bot gentoo-bot added self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels May 7, 2020
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2020-05-07 15:55 UTC
Newest commit scanned: 1416ed3
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/34b34b4a86/output.html

Copy link
Member

@juippis juippis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and all, but this doesn't compile with gcc-10. And since it's in ~, you'll have to patch it or block using it.

@arkamar
Copy link
Member Author

arkamar commented May 13, 2020

Sure, I'll look at it. The gcc-10 bug appeared just today.

@arkamar arkamar changed the title dev-libs/hyperscan: bug fixes dev-libs/hyperscan: bug fixes [please reassign] May 15, 2020
@gentoo-bot gentoo-bot changed the title dev-libs/hyperscan: bug fixes [please reassign] dev-libs/hyperscan: bug fixes May 15, 2020
@gentoo-bot
Copy link

Pull Request assignment

Submitter: @arkamar
Areas affected: ebuilds
Packages affected: dev-libs/hyperscan

dev-libs/hyperscan: @croessner, @arkamar, @gentoo/proxy-maint

Linked bugs

Bugs linked: 722802, 674218, 707486


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else) labels May 15, 2020
@arkamar
Copy link
Member Author

arkamar commented May 15, 2020

I have reported GCC-10 issue to the upstream (intel/hyperscan#239). The error was triggered by -Werror, which had been appended to the CFLAGS because CMAKE_BUILD_TYPE=Gentoo was detected as a non-release build. I have changed it to CMAKE_BUILD_TYPE=Release and everything seems to work correctly.

@arkamar arkamar requested a review from juippis May 15, 2020 13:25
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2020-05-15 13:25 UTC
Newest commit scanned: 5922188
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/567a10bfb3/output.html

@arkamar
Copy link
Member Author

arkamar commented May 19, 2020

@juippis ping

@arkamar arkamar changed the title dev-libs/hyperscan: bug fixes dev-libs/hyperscan: bug fixes & version bump May 25, 2020
@arkamar
Copy link
Member Author

arkamar commented May 25, 2020

New version has been released today. I appended the version bump here as well.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2020-06-03 09:46 UTC
Newest commit scanned: 6c15123
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/5374c31106/output.html

Copy link
Member

@juippis juippis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash the first 3 commits into a single one, and no need to revbump because you're later editing PYTHON_COMPAT anyway.

FAILED: bin/simplegrep 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -frecord-gcc-switches -mssse3 -mavx2  -std=c99 -Wall -Wextra -Wshadow -Wcast-qual -fno-strict-aliasing -DNDEBUG -Wno-array-bounds -Wno-maybe-uninitialized -Wno-abi -fno-omit-frame-pointer -fvisibility=hidden -Wvla -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-stringop-overflow  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0    -rdynamic examples/CMakeFiles/simplegrep.dir/simplegrep.c.o  -o bin/simplegrep  -Wl,-rpath,/var/tmp/portage/dev-libs/hyperscan-5.3.0/work/hyperscan-5.3.0_build/lib  lib/libhs.so.5.3.0 && :
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks1'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks1_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks3'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_mm_mask_mask'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks3_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks1'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks2'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks4_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_p_mask_arr256'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks3_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks2'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_mm_shuffle_end'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks1_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks3'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks4'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_fdr_exec_fat_teddy_msks2_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks4_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_mm_shuffle_end'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks4'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_p_mask_arr256'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `corei7_fdr_exec_fat_teddy_msks2_pck'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/libhs.so.5.3.0: undefined reference to `core2_mm_mask_mask'
collect2: error: ld returned 1 exit status

What could cause this?

* support non-English locales; The patch is taken from
  intel/hyperscan#217 (comment)
* respect cpu_flags_x86 USE flags
* respect -O flags
* set release build type; CMAKE_BUILD_TYPE=Release disables -Werror flag
  which used to trigger false positive error in GCC-10.
  intel/hyperscan#239

Closes: https://bugs.gentoo.org/674218
Closes: https://bugs.gentoo.org/707486
Closes: https://bugs.gentoo.org/722802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
@arkamar
Copy link
Member Author

arkamar commented Jun 8, 2020

The CMAKE_BUILD_TYPE=Release triggers FAT_RUNTIME to true which enables ability to dispatch the most appropriate runtime code for the host processor. Than, the error seems to be triggered with -mavx2 but I don't know how and I am not sure how I missed that, sorry for that.

However, I suggest to disable -DFAT_RUNTIME=false because Gentoo suggests to use -march=native, therefore most suitable runtime code for the processor will be used anyway. FAT_RUNTIME had been disabled when CMAKE_BUILD_TYPE was set to Gentoo in previous versions which means there is no change from user point of view.

I squashed this change together with the first 3 commits and reverted the revbump.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2020-06-08 16:42 UTC
Newest commit scanned: f333602
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/5dc7979261/output.html

# upstream workaround
append-cxxflags -Wno-redundant-move
cmake_src_prepare
}

src_configure() {
CMAKE_BUILD_TYPE=Release
Copy link
Member

@juippis juippis Jun 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be set at all? I'm reading https://devmanual.gentoo.org/eclass-reference/cmake.eclass/index.html and seeing that setting it is not a good idea, unless it doesn't work without?

Could you please test. It's an insta-merge if it is needed, since everything looks good here.

EDIT: And even after when you test it works without.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is needed, it is the package that makes use of if (CMAKE_BUILD_TYPE MATCHES xxx). cmake appends -Werror if not present which triggers false-positive error with gcc-10.

@arkamar arkamar deleted the hyperscan branch June 10, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. self-maintained The PR changes only packages that are maintained by the submitter (i.e. no need to ask anybody else)
Projects
None yet
4 participants