[OpenSER-Devel] [ openser-Bugs-1795761 ] mysql module does not compile while cross compiling

SourceForge.net noreply at sourceforge.net
Fri Nov 9 16:05:24 UTC 2007


Bugs item #1795761, was opened at 2007-09-16 16:26
Message generated for change (Settings changed) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1795761&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: mysql module does not compile while cross compiling

Initial Comment:
While cross compiling openser, mysql does not compile if the HOST machine has mysql installed.  This is due to a change on the modules/mysql/Makefile that enables by default autodetection.  The autodetection will detect the native mysql instalation and the cross compilation will abort (the path to the native libs will be passed instead of the path to the cross compiled libs).


The following patch could fix the issue:

Index: modules/mysql/Makefile
===================================================================
--- modules/mysql/Makefile      (revision 2774)
+++ modules/mysql/Makefile      (working copy)
@@ -6,9 +6,11 @@
 auto_gen=
 NAME=mysql.so
 
-# uncomment the following line if you what to skip
+# set CROSS_COMPILE to true if you want to skip
 # the autodetection
-MYSQLCFG=$(shell which mysql_config)
+ifeq ($(CROSS_COMPILE),)
+       MYSQLCFG=$(shell which mysql_config)
+endif
 
 ifneq ($(MYSQLCFG),)
 
Index: Makefile.defs
===================================================================
--- Makefile.defs       (revision 2774)
+++ Makefile.defs       (working copy)
@@ -120,6 +120,9 @@
 # extra CC command line options (e.g  -march=athlon-mp)
 CC_EXTRA_OPTS ?=
 
+# cross compiling?
+CROSS_COMPILE ?=
+
 # system base
 SYSBASE ?= /usr
 


The idea of the patch is to use the CROSS_COMPILE variable to signal the Makefile that we are cross compiling:
CROSS_COMPILE=true make



Regards,
Ovidiu Sas

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1795761&group_id=139143



More information about the Devel mailing list