Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775308 - dev-db/mysql-8.0.23[debug] error: 'm_sp' was not declared in this scope
Summary: dev-db/mysql-8.0.23[debug] error: 'm_sp' was not declared in this scope
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-10 21:36 UTC by Jack
Modified: 2023-02-18 20:39 UTC (History)
1 user (show)

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


Attachments
build.log (gzipped because of size) (build.log.gz,90.69 KB, application/gzip)
2021-03-10 21:41 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2021-03-10 21:36:34 UTC
Using gcc-9.3.0, mysql++-8.0.23 fails to compile with several ".../mysql/sql/item.cc:1742:10: error: 'm_sp' was not declared in this scope."  

Reproducible: Always

Steps to Reproduce:
1. emerge =dev-db/mysql++-8.0.23
2.
3.
Actual Results:  
Compile failure as stated.

Expected Results:  
Successful emerge.

This seems similar to https://bugs.mysql.com/bug.php?id=102654 "Debug mode causes mysql to fail with error: ‘m_sp’ was not declared."  That one was closed as not a but, but a configuration issue with comment "Indeed. DBUG_OFF and NDEBUG must be in sync."  I get the same failure with debug USE flag set or not, but I'm wondering if one of those two configure settings might actually need adjusting in the ebuild.
Comment 1 Jack 2021-03-10 21:41:54 UTC
Created attachment 690594 [details]
build.log (gzipped because of size)

build.log with debug USE flag set.  Let me know if you want build.log without debug, or other info.
Comment 2 Jack 2021-03-10 21:54:56 UTC
Arghhh - this is mysql, not mysql++.   I have no idea how my brain went out to lunch on that one.
Comment 3 Jack 2021-03-11 00:21:10 UTC
More my bad.  It compiles OK with -debug, so I suppose that makes it less critical, and does support the idea of some issue with the debug related configure settings.
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-12 19:56:58 UTC
I am not sure I understand this bug.

We recently fixed dev-db/mysql-connector-c via https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1a22fa531c41c3b0d5f8c99437ec52bc19c96ac

dev-db/mysql did that before. Are you using dev-db/mysql[debug]?

USE=debug will affect

-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
-DWITH_DEBUG=$(usex debug)

I am not sure what you are expecting. Should USE=debug still set -DNDEBUG?
Comment 5 Jack 2021-03-12 20:39:31 UTC
Sorry for any confusion.  If it matters, I do have mysql-connector-c-8.0.22 installed.  (I see 8.0.23 is still ~amd64.  Would it make a difference?)

The bug is just that trying to emerge mysql-8.0.23 with USE=debug produces the stated error.  The mysql bug I linked suggests that DBUG_OFF and NDEBUG need to be in sync, and grepping for either in build.log shows:
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -DDBUG_OFF 
-- CMAKE_CXX_FLAGS_RELEASE: -DDBUG_OFF -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL: -DDBUG_OFF -Os -DNDEBUG
so I'm not certain, but wonder if the problem is the lack of -DNDEBUG for RELWITHDEBINFO.  Unfortunately, I didn't grep the build.log with USE=-debug to compare.  I've got it insatalled without debug right now, so I'm re-emerging with debug to confirm the error, and then I'll try to test with the -DNDEBUG added back.  Unfortunately, it's running on a not very fast machine so that emerge is about an hour.
I'm really no expert here, but yes, my suspicion is that USE=debug should set -DNDEBUG as well as -DDBUG_OFF.
Comment 6 Jack 2022-04-27 17:29:59 UTC
I've since switched to mariadb, so I can't confirm if this is still an issue or not.  If nobody else has had this problem, I suppose it's reasonable to close this as WORKSFORME.
Comment 7 Jack 2023-02-18 20:39:22 UTC
Closing per my previous comment.  I figure if anyone else sees the problem, they can reopen or file a new bug.