-
-
Save anatole/13047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[asics@gmg6p9ab ~/src/do/do_mysql]$ rake install | |
(in /home/asics/src/do/do_mysql) | |
Building native extensions. This could take a while... | |
ERROR: Error installing pkg/do_mysql-0.9.6: | |
ERROR: Failed to build gem native extension. | |
/opt/local/bin/ruby18 extconf.rb install --local pkg/do_mysql-0.9.6 --no-update-sources | |
checking for mysql.h... yes | |
checking for main() in -lmysqlclient... yes | |
checking for mysql_query()... yes | |
checking for mysql_ssl_set()... yes | |
creating Makefile | |
make | |
gcc -I. -I. -I/opt/local/lib/ruby/1.8/i386-solaris2 -I. -DHAVE_MYSQL_H -DHAVE_MYSQL_QUERY -DHAVE_MYSQL_SSL_SET -D_REENTRANT -I/usr/include -I/opt/local/include/db4 -I/opt/local/include -I/opt/local/include/mysql -DUSE_OLD_FUNCTIONS -DHAVE_CURSES_H -I/opt/local/include -fPIC -O -D_REENTRANT -I/usr/include -I/opt/local/include/db4 -I/opt/local/include -fPIC -Wall -c do_mysql_ext.c | |
do_mysql_ext.c: In function `parse_date_time': | |
do_mysql_ext.c:216: error: structure has no member named `tm_gmtoff' | |
do_mysql_ext.c:217: error: structure has no member named `tm_gmtoff' | |
do_mysql_ext.c:220: error: structure has no member named `tm_gmtoff' | |
do_mysql_ext.c:244: error: structure has no member named `tm_gmtoff' | |
*** Error code 1 | |
make: Fatal error: Command failed for target `do_mysql_ext.o' | |
Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/do_mysql-0.9.6 for inspection. | |
Results logged to /opt/local/lib/ruby/gems/1.8/gems/do_mysql-0.9.6/ext/gem_make.out | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MitkOK: Ok, thanks guys. | |
[3:12pm] Damm: or you can do the hivelogic walkthrough i suppose | |
[3:12pm] Damm: it's just ruby being lame though | |
[3:13pm] Damm: there is no ruby-dev package, afaik it comes all installed... but some crap gets bundled in xcode | |
[3:13pm] Damm: so you never know | |
[3:13pm] sunfmin: Hi All | |
[3:13pm] sunfmin: I got problem for compile do_mysql on joyent opensolaris. | |
[3:13pm] sunfmin: anyone have the same problem? | |
[3:13pm] sunfmin: http://gist.github.com/13047 | |
[3:14pm] Damm: sunfmin, schweet that's a perty good one. | |
[3:14pm] MitkOK: I say ruby-dev, because in Linux this is the needed lib | |
[3:14pm] dirs left the chat room. | |
[3:15pm] Damm: MitkOK, your fine. I was aware what your thought process was | |
[3:15pm] MitkOK: | |
[3:15pm] sunfmin: Hi Damm? any suggestions for me to do? | |
[3:15pm] Damm: sunfmin, wanna hack up time.h? | |
[3:16pm] Damm: basically the time.h is different on solaris | |
[3:16pm] Damm: i'm really not suprised that that do isn't solaris friendly. | |
[3:16pm] sunfmin: Can I change the do_mysql code to fix it? | |
[3:17pm] aymerick joined the chat room. | |
[3:17pm] aymerick was granted voice by ChanServ. | |
[3:17pm] Damm: sunfmin, do me a favor and post the struct tm from /usr/include/time.h | |
[3:17pm] Damm: stick it in another gist. | |
[3:19pm] sunfmin: here it is: http://gist.github.com/13047 | |
[3:20pm] Damm: ouch | |
[3:20pm] Damm: that's a big difference compared to libc. | |
[3:20pm] GitHub139 joined the chat room. | |
[3:20pm] GitHub139 was granted voice by ChanServ. | |
[3:20pm] GitHub139: Tons of comments; support for various forking configurations | |
[3:20pm] GitHub139: http://is.gd/39Fv | |
[3:20pm] GitHub139 left the chat room. | |
[3:20pm] Damm: http://rafb.net/p/DlTqOr24.html | |
[3:20pm] Damm: that's glibc's time.h | |
[3:20pm] Damm: you can see struct tm there... | |
[3:21pm] Damm: i would say it would be better to make the code not use use that or something | |
[3:21pm] • Damm still has opensolaris on a vm. | |
[3:21pm] Damm: i'll look into it more later if you don't want to hack on it | |
[3:25pm] GitHub61 joined the chat room. | |
[3:25pm] GitHub61 was granted voice by ChanServ. | |
[3:25pm] GitHub61: Respawn processes killed with kill -9 | |
[3:25pm] GitHub61: http://is.gd/39FK | |
[3:25pm] GitHub61 left the chat room. | |
[3:28pm] sunfmin: Thanks a lot, Damm | |
[3:29pm] pluesch0r left the chat room. | |
[3:32pm] Damm: sunfmin, you can prolly just throw in the long int and it should work... but they should be really depending on a more stable time.h | |
[3:32pm] Damm: it's good to have them get it before 1.0, because enterprise means solaris | |
[3:35pm] wyhaines left the chat room. (Read error: 110 (Connection timed out)) | |
[3:36pm] hcatlin joined the chat room. | |
[3:36pm] hcatlin was granted voice by ChanServ. | |
[3:37pm] qhox left the chat room. (Read error: 110 (Connection timed out)) | |
[3:37pm] sunfmin: Damm, how to do "throw in the long int", is that mean to change the file ext/do_mysql_ext.c ? | |
[3:38pm] sunfmin: sorry, I am new for C. not quit understand how it works. | |
[3:38pm] Damm: sunfmin, send a post to [email protected] | |
[3:38pm] sunfmin: OK, I'll do it. | |
[3:39pm] Damm: subscribe to it if you'd like ([email protected]) | |
[3:39pm] sunfmin: I have that. | |
[3:39pm] Damm: Point them to your opensolaris distro or nexenta so they can test it. | |
[3:39pm] sunfmin: ok. | |
[3:40pm] Damm: my only real concern is i can make it compile, but it'll be still defective. | |
[3:41pm] sunfmin: I'd like to know how to make it compile, I want things working for now. Latter when they fixed it, I just reinstall the do_mysql. | |
[3:41pm] Damm: then basically you want to comment out everything in time.h about extern struct tm | |
[3:41pm] Damm: and then paste in the struct tm from the paste I did earlier into your time.h | |
[3:42pm] malomalo left the chat room. | |
[3:42pm] Damm: you'll have to do a search and replace because it's mentioned 4x afaik | |
[3:42pm] Damm: i'm pretty sure it'll be an epic fail in the long run, but it should compile and work kinda | |
[3:42pm] smoofles joined the chat room. | |
[3:42pm] smoofles was granted voice by ChanServ. | |
[3:42pm] sunfmin: ok, I will try to do it. thanks a lot. | |
[3:45pm] Damm: good luck hopefully it'll get you going for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CDDL HEADER START | |
* | |
* The contents of this file are subject to the terms of the | |
* Common Development and Distribution License (the "License"). | |
* You may not use this file except in compliance with the License. | |
* | |
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
* or http://www.opensolaris.org/os/licensing. | |
* See the License for the specific language governing permissions | |
* and limitations under the License. | |
* | |
* When distributing Covered Code, include this CDDL HEADER in each | |
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. | |
* If applicable, add the following below this CDDL HEADER, with the | |
* fields enclosed by brackets "[]" replaced with your own identifying | |
* information: Portions Copyright [yyyy] [name of copyright owner] | |
* | |
* CDDL HEADER END | |
*/ | |
/* Copyright (c) 1988 AT&T */ | |
/* All Rights Reserved */ | |
/* | |
* Copyright 2007 Sun Microsystems, Inc. All rights reserved. | |
* Use is subject to license terms. | |
*/ | |
#ifndef _TIME_H | |
#define _TIME_H | |
#pragma ident "@(#)time.h 1.47 07/01/05 SMI" /* SVr4.0 1.18 */ | |
#include <sys/feature_tests.h> | |
#include <iso/time_iso.h> | |
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
(_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) | |
#include <sys/types.h> | |
#include <sys/time_impl.h> | |
#endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */ | |
/* | |
* Allow global visibility for symbols defined in | |
* C++ "std" namespace in <iso/time_iso.h>. | |
*/ | |
#if __cplusplus >= 199711L | |
using std::size_t; | |
using std::clock_t; | |
using std::time_t; | |
using std::tm; | |
using std::asctime; | |
using std::clock; | |
using std::ctime; | |
using std::difftime; | |
using std::gmtime; | |
using std::localtime; | |
using std::mktime; | |
using std::time; | |
using std::strftime; | |
#endif | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
#ifndef _CLOCKID_T | |
#define _CLOCKID_T | |
typedef int clockid_t; | |
#endif | |
#ifndef _TIMER_T | |
#define _TIMER_T | |
typedef int timer_t; | |
#endif | |
#if defined(__STDC__) | |
#if defined(__EXTENSIONS__) || \ | |
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) | |
extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, | |
struct tm *_RESTRICT_KYWD); | |
extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD, | |
struct tm *_RESTRICT_KYWD); | |
#endif | |
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
defined(_XPG4) || defined(__EXTENSIONS__) | |
#ifdef _STRPTIME_DONTZERO | |
#ifdef __PRAGMA_REDEFINE_EXTNAME | |
#pragma redefine_extname strptime __strptime_dontzero | |
#else /* __PRAGMA_REDEFINE_EXTNAME */ | |
extern char *__strptime_dontzero(const char *, const char *, struct tm *); | |
#define strptime __strptime_dontzero | |
#endif /* __PRAGMA_REDEFINE_EXTNAME */ | |
#endif /* _STRPTIME_DONTZERO */ | |
extern char *strptime(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, | |
struct tm *_RESTRICT_KYWD); | |
#endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))... */ | |
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
(_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) | |
/* | |
* Neither X/Open nor POSIX allow the inclusion of <signal.h> for the | |
* definition of the sigevent structure. Both require the inclusion | |
* of <signal.h> and <time.h> when using the timer_create() function. | |
* However, X/Open also specifies that the sigevent structure be defined | |
* in <time.h> as described in the header <signal.h>. This prevents | |
* compiler warnings for applications that only include <time.h> and not | |
* also <signal.h>. The sigval union and the sigevent structure is | |
* therefore defined both here and in <sys/siginfo.h> which gets included | |
* via inclusion of <signal.h>. | |
*/ | |
#ifndef _SIGVAL | |
#define _SIGVAL | |
union sigval { | |
int sival_int; /* integer value */ | |
void *sival_ptr; /* pointer value */ | |
}; | |
#endif /* _SIGVAL */ | |
#ifndef _SIGEVENT | |
#define _SIGEVENT | |
struct sigevent { | |
int sigev_notify; /* notification mode */ | |
int sigev_signo; /* signal number */ | |
union sigval sigev_value; /* signal value */ | |
void (*sigev_notify_function)(union sigval); | |
pthread_attr_t *sigev_notify_attributes; | |
int __sigev_pad2; | |
}; | |
#endif /* _SIGEVENT */ | |
extern int clock_getres(clockid_t, struct timespec *); | |
extern int clock_gettime(clockid_t, struct timespec *); | |
extern int clock_settime(clockid_t, const struct timespec *); | |
extern int timer_create(clockid_t, struct sigevent *_RESTRICT_KYWD, | |
timer_t *_RESTRICT_KYWD); | |
extern int timer_delete(timer_t); | |
extern int timer_getoverrun(timer_t); | |
extern int timer_gettime(timer_t, struct itimerspec *); | |
extern int timer_settime(timer_t, int, const struct itimerspec *_RESTRICT_KYWD, | |
struct itimerspec *_RESTRICT_KYWD); | |
extern int nanosleep(const struct timespec *, struct timespec *); | |
extern int clock_nanosleep(clockid_t, int, | |
const struct timespec *, struct timespec *); | |
#endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))... */ | |
#if !defined(_STRICT_STDC) || defined(__XOPEN_OR_POSIX) || \ | |
defined(__EXTENSIONS__) | |
extern void tzset(void); | |
extern char *tzname[2]; | |
/* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */ | |
#if !defined(_XPG6) || defined(__EXTENSIONS__) | |
#ifndef CLK_TCK | |
extern long _sysconf(int); /* System Private interface to sysconf() */ | |
#define CLK_TCK ((clock_t)_sysconf(3)) /* clock ticks per second */ | |
/* 3 is _SC_CLK_TCK */ | |
#endif | |
#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ | |
#if (!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \ | |
defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) | |
extern long timezone; | |
extern int daylight; | |
#endif | |
#endif /* !defined(_STRICT_STDC) || defined(__XOPEN_OR_POSIX)... */ | |
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
defined(__EXTENSIONS__) | |
extern int cftime(char *, char *, const time_t *); | |
extern int ascftime(char *, const char *, const struct tm *); | |
extern long altzone; | |
#endif | |
#if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
defined(_XPG4_2) || defined(__EXTENSIONS__) | |
extern struct tm *getdate(const char *); | |
#ifdef _REENTRANT | |
#undef getdate_err | |
#define getdate_err *(int *)_getdate_err_addr() | |
extern int *_getdate_err_addr(void); | |
#else | |
extern int getdate_err; | |
#endif /* _REENTRANT */ | |
#endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))... */ | |
#else /* __STDC__ */ | |
extern int cftime(), ascftime(); | |
extern void tzset(); | |
#ifdef _STRPTIME_DONTZERO | |
#ifdef __PRAGMA_REDEFINE_EXTNAME | |
#pragma redefine_extname strptime __strptime_dontzero | |
#else /* __PRAGMA_REDEFINE_EXTNAME */ | |
extern char *__strptime_dontzero(); | |
#define strptime __strptime_dontzero | |
#endif /* __PRAGMA_REDEFINE_EXTNAME */ | |
#endif /* _STRPTIME_DONTZERO */ | |
extern char *strptime(); | |
#if defined(__EXTENSIONS__) || \ | |
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) | |
extern struct tm *gmtime_r(); | |
extern struct tm *localtime_r(); | |
#endif | |
extern long timezone, altzone; | |
extern int daylight; | |
extern char *tzname[2]; | |
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) | |
extern struct tm *getdate(); | |
#ifdef _REENTRANT | |
#undef getdate_err | |
#define getdate_err *(int *)_getdate_err_addr() | |
extern int *_getdate_err_addr(); | |
#else | |
extern int getdate_err; | |
#endif /* _REENTRANT */ | |
#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ | |
#endif /* __STDC__ */ | |
/* | |
* ctime_r() & asctime_r() prototypes are defined here. | |
*/ | |
/* | |
* Previous releases of Solaris, starting at 2.3, provided definitions of | |
* various functions as specified in POSIX.1c, Draft 6. For some of these | |
* functions, the final POSIX 1003.1c standard had a different number of | |
* arguments and return values. | |
* | |
* The following segment of this header provides support for the standard | |
* interfaces while supporting applications written under earlier | |
* releases. The application defines appropriate values of the feature | |
* test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate | |
* whether it was written to expect the Draft 6 or standard versions of | |
* these interfaces, before including this header. This header then | |
* provides a mapping from the source version of the interface to an | |
* appropriate binary interface. Such mappings permit an application | |
* to be built from libraries and objects which have mixed expectations | |
* of the definitions of these functions. | |
* | |
* For applications using the Draft 6 definitions, the binary symbol is the | |
* same as the source symbol, and no explicit mapping is needed. For the | |
* standard interface, the function func() is mapped to the binary symbol | |
* _posix_func(). The preferred mechanism for the remapping is a compiler | |
* #pragma. If the compiler does not provide such a #pragma, the header file | |
* defines a static function func() which calls the _posix_func() version; | |
* this has to be done instead of #define since POSIX specifies that an | |
* application can #undef the symbol and still be bound to the correct | |
* implementation. Unfortunately, the statics confuse lint so we fallback to | |
* #define in that case. | |
* | |
* NOTE: Support for the Draft 6 definitions is provided for compatibility | |
* only. New applications/libraries should use the standard definitions. | |
*/ | |
#if defined(__EXTENSIONS__) || defined(_REENTRANT) || \ | |
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ | |
(_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) | |
#if defined(__STDC__) | |
#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) | |
#ifdef __PRAGMA_REDEFINE_EXTNAME | |
#pragma redefine_extname ctime_r __posix_ctime_r | |
#pragma redefine_extname asctime_r __posix_asctime_r | |
extern char *asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD); | |
extern char *ctime_r(const time_t *, char *); | |
#else /* __PRAGMA_REDEFINE_EXTNAME */ | |
extern char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, | |
char *_RESTRICT_KYWD); | |
extern char *__posix_ctime_r(const time_t *, char *); | |
#ifdef __lint | |
#define ctime_r __posix_ctime_r | |
#define asctime_r __posix_asctime_r | |
#else /* !__lint */ | |
static char * | |
asctime_r(const struct tm *_RESTRICT_KYWD __tm, char *_RESTRICT_KYWD __buf) | |
{ | |
return (__posix_asctime_r(__tm, __buf)); | |
} | |
static char * | |
ctime_r(const time_t *__time, char *__buf) | |
{ | |
return (__posix_ctime_r(__time, __buf)); | |
} | |
#endif /* !__lint */ | |
#endif /* __PRAGMA_REDEFINE_EXTNAME */ | |
#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ | |
extern char *asctime_r(const struct tm *, char *, int); | |
extern char *ctime_r(const time_t *, char *, int); | |
#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ | |
#else /* __STDC__ */ | |
#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) | |
#ifdef __PRAGMA_REDEFINE_EXTNAME | |
#pragma redefine_extname asctime_r __posix_asctime_r | |
#pragma redefine_extname ctime_r __posix_ctime_r | |
extern char *asctime_r(); | |
extern char *ctime_r(); | |
#else /* __PRAGMA_REDEFINE_EXTNAME */ | |
extern char *__posix_asctime_r(); | |
extern char *__posix_ctime_r(); | |
#ifdef __lint | |
#define asctime_r __posix_asctime_r | |
#define ctime_r __posix_ctime_r | |
#else /* !__lint */ | |
static char * | |
asctime_r(__tm, __buf) | |
struct tm *__tm; | |
char *__buf; | |
{ | |
return (__posix_asctime_r(__tm, __buf)); | |
} | |
static char * | |
ctime_r(__time, __buf) | |
time_t *__time; | |
char *__buf; | |
{ | |
return (__posix_ctime_r(__time, __buf)); | |
} | |
#endif /* !__lint */ | |
#endif /* __PRAGMA_REDEFINE_EXTNAME */ | |
#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ | |
extern char *asctime_r(); | |
extern char *ctime_r(); | |
#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ | |
#endif /* __STDC__ */ | |
#endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */ | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif /* _TIME_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment