Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187020 - dev-db/mysql-5.0.44-r1 (not yet) working in prefix
Summary: dev-db/mysql-5.0.44-r1 (not yet) working in prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High enhancement (vote)
Assignee: Gentoo non-Linux Team
URL: http://www.mysql.com/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-29 14:22 UTC by Elias Pipping (RETIRED)
Modified: 2008-09-04 07:51 UTC (History)
1 user (show)

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


Attachments
diff against mysql.eclass (mysql-eclass.diff,4.81 KB, patch)
2007-07-29 14:23 UTC, Elias Pipping (RETIRED)
Details | Diff
dev-db/mysql (mysql-5.0.44-r1.ebuild,1.86 KB, text/plain)
2007-07-29 14:25 UTC, Elias Pipping (RETIRED)
Details
diff against mysql.eclass (mysql-eclass.patch,4.82 KB, patch)
2007-07-29 14:36 UTC, Elias Pipping (RETIRED)
Details | Diff
diff against mysql.eclass (mysql-eclass.patch,4.81 KB, patch)
2007-07-29 14:37 UTC, Elias Pipping (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Pipping (RETIRED) gentoo-dev 2007-07-29 14:22:42 UTC
MySQL is a step closer to working in prefix. What's different now is:

* it compiles
* it is linked correctly
* ${EPREFIX}/etc/mysql.cnf contains the correct paths.

What doesn't work:

1) % mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '${EPREFIX}/var/run/mysqld/mysqld.sock' (2)
# note: in pratice ${EPREFIX} is expanded.

2) the scripts in dev-db/mysql-init-scripts are all un-prefixed.
Comment 1 Elias Pipping (RETIRED) gentoo-dev 2007-07-29 14:23:19 UTC
Created attachment 126343 [details, diff]
diff against mysql.eclass
Comment 2 Elias Pipping (RETIRED) gentoo-dev 2007-07-29 14:25:24 UTC
Created attachment 126344 [details]
dev-db/mysql
Comment 3 Elias Pipping (RETIRED) gentoo-dev 2007-07-29 14:36:07 UTC
Created attachment 126346 [details, diff]
diff against mysql.eclass

added some more quotes to occurrences of EPREFIX
Comment 4 Elias Pipping (RETIRED) gentoo-dev 2007-07-29 14:37:44 UTC
Created attachment 126348 [details, diff]
diff against mysql.eclass

one pair of quotes was wrong
Comment 5 Fabian Groffen gentoo-dev 2007-07-29 22:20:28 UTC
looks like you start the client app, but forgot to start the server daemon first (mysqld)
Comment 6 Elias Pipping (RETIRED) gentoo-dev 2007-07-29 23:19:23 UTC
`sudo mysqld` results in

mysqld: File '${EPREFIX}/var/run/mysqld/mysqld-bin.index' not found (Errcode: 13)

the file is there, though.

Comment 7 Fabian Groffen gentoo-dev 2007-07-30 07:22:29 UTC
any reason why you run that as root?
Comment 8 Elias Pipping (RETIRED) gentoo-dev 2007-07-30 13:43:03 UTC
It complained about being run with --user (I didn't pass that so it's passed that by default) and said it required root privileges to do that. Thinking a bit more about it, --user is probably caused by the config files in which the default user is called 'mysql', a user that's not created(*) and does not own any files(**) so that should probably be gotten rid of.

(*) enewuser is disabled
(**) chown is invoked but fails, naturally
Comment 9 Elias Pipping (RETIRED) gentoo-dev 2007-09-05 15:03:21 UTC
Comment on attachment 126343 [details, diff]
diff against mysql.eclass

i've committed the eclass in r9391[1], because it doesn't hurt.

[1] http://overlays.gentoo.org/proj/alt/changeset/9391
Comment 10 Ian Stakenvicius 2007-12-12 19:13:59 UTC
mysql has altivec issues, i had to disable all my extra cflags (-faltivec -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec) to compile this.
Comment 11 Fabian Groffen gentoo-dev 2008-09-03 21:12:42 UTC
Ian, that is http://bugs.mysql.com/bug.php?id=30356,
just undef bool in any case, such that the code below will define it

This patch helps, I'm still working on the ebuild to get it right.

--- include/my_global.h
+++ include/my_global.h
@@ -133,6 +133,7 @@
 #  if defined(__ppc__) || defined(__ppc64__)
 #    define WORDS_BIGENDIAN
 #  endif
+#  undef bool
 #endif /* defined(__APPLE__) && defined(__MACH__) */
Comment 12 Fabian Groffen gentoo-dev 2008-09-04 07:51:42 UTC
I added the darwin patch and did some misc fixes to the eclass, and it seems to work for me.  Added it to the tree.  Thanks all!