Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692682 - media-video/motion-4.1.1-r1 USE="mysql" fails to build against dev-db/mysql-connector-c-8.0.17-r1: motion.c:1146:13: error: unknown type name ‘my_bool’
Summary: media-video/motion-4.1.1-r1 USE="mysql" fails to build against dev-db/mysql-c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johannes Willem (Hans) Fernhout
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mysql-8
  Show dependency tree
 
Reported: 2019-08-21 14:31 UTC by Attila Tóth
Modified: 2020-12-07 18:38 UTC (History)
3 users (show)

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


Attachments
motion-release-4.1.1-my_bool-error.diff (motion-release-4.1.1-my_bool-error.diff,564 bytes, patch)
2019-08-21 14:34 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2019-08-21 14:31:26 UTC
motion.c: In function ‘motion_init’:
motion.c:1146:13: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 1146 |             my_bool my_true = TRUE;
      |             ^~~~~~~
      |             bool
make: *** [Makefile:105: motion.o] Error 1
make: *** Waiting for unfinished jobs....
Comment 1 Attila Tóth 2019-08-21 14:32:13 UTC
This related to the recent version bump of mysql-8 & mysql-connector-c-8.
Candidate for tracker:
https://bugs.gentoo.org/692570
Comment 2 Attila Tóth 2019-08-21 14:34:53 UTC
Created attachment 587764 [details, diff]
motion-release-4.1.1-my_bool-error.diff

Proposed patch to take care of the issue against >=dev-db/mysql-connector-c-8.0.1
Comment 3 William Breathitt Gray 2019-08-27 06:14:06 UTC
Upstream issue opened: https://github.com/Motion-Project/motion/issues/995

I'll wait to see how upstream decides to resolve this, then backport their solution.
Comment 4 William Breathitt Gray 2020-04-19 13:53:10 UTC
Upstream decided to redefine the my_true to an int datatype. This resolves the issue for MySQL, but I think it may cause problems for MariaDB which has deprecated the mysql_options function.

Here's an alternative solution that should satisfy both scenarios: https://github.com/vilhelmgray/motion/commit/79ef57405c49ca1226fc00af1995bdab287ae9ea
Comment 5 Attila Tóth 2020-04-19 17:22:44 UTC
(In reply to William Breathitt Gray from comment #4)
> Upstream decided to redefine the my_true to an int datatype. This resolves
> the issue for MySQL, but I think it may cause problems for MariaDB which has
> deprecated the mysql_options function.
> 
> Here's an alternative solution that should satisfy both scenarios:
> https://github.com/vilhelmgray/motion/commit/
> 79ef57405c49ca1226fc00af1995bdab287ae9ea

The alternative solution seems to take care of MariaDB as well. Looks safer when it comes to side-effects. I would prefer the alternative instead of upstream's int way.
Comment 6 Thomas Beutin 2020-05-14 14:10:50 UTC
(In reply to William Breathitt Gray from comment #4)
> Upstream decided to redefine the my_true to an int datatype. This resolves
> the issue for MySQL, but I think it may cause problems for MariaDB which has
> deprecated the mysql_options function.
> 
> Here's an alternative solution that should satisfy both scenarios:
> https://github.com/vilhelmgray/motion/commit/
> 79ef57405c49ca1226fc00af1995bdab287ae9ea

I tried to use this patch w/o success:

patching file configure.ac                                                                                                                                                                                                              
Hunk #1 FAILED at 90.                                                                                                                 
Hunk #2 FAILED at 259.                                                                                                                             
Hunk #3 FAILED at 411.                                                                                                                    
3 out of 3 hunks FAILED -- saving rejects to file configure.ac.rej                                                                                                                                                                           
can't find file to patch at input line 69                                                                                                                                                  
Perhaps you used the wrong -p or --strip option?                                                                                                                   
The text leading up to this was:                                                                                                  
--------------------------                                                                               
|diff --git a/src/motion.c b/src/motion.c                                                                                                                                                                                                    
|index 8f15b041..d4b3666d 100644                                                                                                                             
|--- a/src/motion.c                                                                                                                                                                                                                          
|+++ b/src/motion.c                                                                                                                                                                                                                          
--------------------------                                                                                                                                                                                                                   
No file to patch.  Skipping patch.                                                                                                        
2 out of 2 hunks ignored
Comment 7 Johannes Willem (Hans) Fernhout 2020-06-04 17:17:24 UTC
Motion-4.1.1 mixed up the client software for MySQL and MariaDB. This is resolved in motion-4.3.1, which is now in portage in the testing branch.
Comment 8 William Breathitt Gray 2020-06-08 19:41:36 UTC
(In reply to Hans Fernhout from comment #7)
> Motion-4.1.1 mixed up the client software for MySQL and MariaDB. This is
> resolved in motion-4.3.1, which is now in portage in the testing branch.

I don't believe this is resolved yet upstream; it looks like they are still calling mysql_options and just assuming MariaDB is compatible with MySQL: https://github.com/Motion-Project/motion/blob/392779e90bf101eeaebb2f95309963281d55395e/src/motion.c#L1062
Comment 9 Johannes Willem (Hans) Fernhout 2020-06-09 05:45:57 UTC
The release notes of 4.3.1 mention "MariaDB initializations". I have also tested it with both MySQL and MariaDB and it seems to work fine. Do you still encounter compilation errors?
Comment 10 Johannes Willem (Hans) Fernhout 2020-12-07 18:38:09 UTC
4.1.1 is no longer in the tree. The MySQL/MariaDB issue has been addressed upstream in newer versions of motion.