Packages: Error building MySQL for brcm2708 (CC trunk) on Mac OS X 10.10.3

Created on 9 Apr 2015  路  87Comments  路  Source: openwrt/packages

I'm trying to build mysql-5.1.73 (with hard FP support for Raspberry Pi) and get this error:

```g++ -I /Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/include -o /Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/sql/gen_lex_hash /Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/sql/gen_lex_hash.cc
In file included from /Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/sql/gen_lex_hash.cc:82:
/Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/include/my_global.h:470:10: fatal error:
'crypt.h' file not found

include

     ^

1 error generated.
make[3]: *** [/Volumes/OpenWrt/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/mysql-5.1.73/.built] Error 1
make[3]: Leaving directory `/Volumes/OpenWrt/openwrt/feeds/packages/utils/mysql'```

Any ideas?

All 87 comments

Maybe some toolchain/OSX issue. Building mysql with hardfloat on Linux seem to work (at least on debian)

  • check if there is a crypt.h in staging_dir/ (it should been created there)
  • paste the contents config.log from build_dir/target..../mysql-5.1.73/ into gist/pastebin and post the link

crypt.h exists in

staging_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/include

but not in to target (or host)

config.log here:

https://gist.githubusercontent.com/jammmet/090c47d9da5f0c17df3c/raw/gistfile1.txt

I'm getting this same error on OS X 10.11.4, compiling for the Raspberry Pi as well.

@jammmet I know it's over a year later, but did you by chance overcome this?

Same issue on macOS 10.12

Same issue here. With 10.12.

did you tried #4221 ?

@jwhitehorn @giveup @greekstreet
Are you seeing this also on LEDE?
https://lede-project.org/

September 2017 and same issue, tried MariaDB but mirrors are dead.

@lucize how to compile this with LEDE?

git clone https://git.lede-project.org/source.git
cd source
./scripts/feeds update -a
./scripts/feeds install -a
cd feeds/packages
git pull origin pull/4221/head
ln -s ../../../feeds/packages/utils/mariadb ../../package/feeds/packages/
cd ../..
make menuconfig

@lucize just wish this works .... I am so excited about giving it try. Thank You

I don't own an Mac so I can't promise it will work, I didn't test it on OS X

@lucize fatal: refusing to merge unrelated histories it's not merging :(

ok let me try from scratch. but is saying that This branch has no conflicts with the base branch

@lucize well, thank you mate. I can compile MySQL with ubuntu, but doesn't work with OSX. Guess I will stuck with ubuntu for compiling image.

 * branch              refs/pull/4221/head -> FETCH_HEAD
fatal: refusing to merge unrelated histories

I'll try a PR update, as 5.5.57 is out

updated, resynced but in won't allow me to git pull, don't know why (not so git master user)
unpack de zip, there is atar.xz, unpack it into feeds/packages/utils
and after that from feeds/packages folder run

ln -s ../../../feeds/packages/utils/mariadb ../../package/feeds/packages/
cd ../..
make menuconfig

mariadb.zip

you can also download it as a patch and apply it

cd feeds/packages
wget https://github.com/openwrt/packages/pull/4221.patch
patch  -p1  < 4221.patch
rm -f < 4221.patch
ln -s ../../../feeds/packages/utils/mariadb ../../package/feeds/packages/
cd ../..
make menuconfig

I encountered this error, which I think causing for my compiler.

https://gist.github.com/ibnbd/d532eafc503670698fa96237509d1305

maybe the tools are too old, unfortunately no record of what line is causing it
can you try to add --with-gnu-as argument to make ?

         +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
        SUBDIRS="include" \
        DESTDIR="$(PKG_INSTALL_DIR)"

@lucize sure thing Captain

or you could ask for a more professional help on
https://launchpad.net/~maria-developers
https://launchpad.net/~maria-discuss

Actually I tried with my remote Ubuntu as well. And it also failed. at 58%, while OSX failed at 7%

on what target ?
I only tested it on x86 under ubuntu 16 and 17

ramips
mt7621
It's a Netgear router, I think this is the problem. All I wanted to build MySQL from my OSX, which I can do from a remote Ubuntu server. I will discontinue that ubuntu soon, so I wanted to use my OSX for updates.

yeah, I'll change to glibc to see if is a musl problem or higher version of gcc

[ 64%] Linking CXX executable explain_filename-t
../../mysys/libmysys.a(my_context.c.o): In function `my_context_spawn_internal':
my_context.c:(.text+0x3c): undefined reference to `setcontext'
my_context.c:(.text+0x40): undefined reference to `setcontext'
../../mysys/libmysys.a(my_context.c.o): In function `my_context_continue':
my_context.c:(.text+0xa4): undefined reference to `swapcontext'
my_context.c:(.text+0xc4): undefined reference to `swapcontext'
../../mysys/libmysys.a(my_context.c.o): In function `my_context_spawn':
my_context.c:(.text+0x140): undefined reference to `getcontext'
my_context.c:(.text+0x15c): undefined reference to `getcontext'
my_context.c:(.text+0x180): undefined reference to `makecontext'
my_context.c:(.text+0x1c0): undefined reference to `makecontext'
../../mysys/libmysys.a(my_context.c.o): In function `my_context_yield':
my_context.c:(.text+0x204): undefined reference to `swapcontext'
my_context.c:(.text+0x218): undefined reference to `swapcontext'
collect2: error: ld returned 1 exit status
unittest/sql/CMakeFiles/explain_filename-t.dir/build.make:111: recipe for target 'unittest/sql/explain_filename-t' failed
make[6]: *** [unittest/sql/explain_filename-t] Error 1

so using glibc instead of musl solves the problem, under ubuntu

-rw-r--r-- 1 ubuntu ubuntu  1594560 Sep  2 11:31 mariadb-client_5.5.57-1_mipsel_24kc.ipk
-rw-r--r-- 1 ubuntu ubuntu  4463108 Sep  2 11:31 mariadb-client-extra_5.5.57-1_mipsel_24kc.ipk
-rw-r--r-- 1 ubuntu ubuntu 20079291 Sep  2 11:31 mariadb-server_5.5.57-1_mipsel_24kc.ipk

@lucize where I have to change to make it work on ubuntu. Sorry I am not that expert with codes :)

make menuconfig
advanced configuration options
toolchain options
c library implementation
(also you could test with newer gcc versions)

@ibnbd I received by mail the conflict between libmariadb and libmysql, did you unchecked the mysql lib? all is well ?

@lucize not actually, I had to give up. I am using PHP PDO (MySQL) which automatic selects libmysql. And having libmysql selected libmariadb not installing.

it can be set for libmariadb to PROVIDES:=libmysql so it thinks that is libmysql, I only set it up as libmysqlclient. I'll make the change

@lucize you are an amazing author 馃憤

I see in the mail that

satisfy_dependencies_for: Cannot satisfy the following dependencies for mariadb-server:
mariadb *

there was a typo DEPENDS:=+mariadb, but I repaired it quickly, without the +, but I think that you downloaded the + version
I'll make a test with php pdo

@lucize sure thing Captain

So I corrected the dependencies to mariadb and some dev lib files from staging tree to be compatible with mysql dev location but php is selecting the mysql version despite that I provided the libmysqlclient from mariadb.
It can still be used if you change the deps for php to libmariadb in feeds/packages/lang/php7 there is a Makefile, replace the libmysqlclient with libmariadb (two times for mysqli and mysql)
I don't know how PROVIDES can have priority over a package of the same name at build time or in menuconfig.
Even if I first select libmariadb that provides libmysqlclient after selecting php-pdo-mysql, libmysqlclient from mysql will be selected
Maybe @jow- can elucidate on it
please overwrite the Makefile of mariadb with the new one from the PR

Is that 20MB for mariadb-server_5.5.57-1_mipsel_24kc.ipk? I would love to use it, but compared to mysql-server_5.1.73-2_mipsel_24kc.ipk at 2.7MB, it's simply too large for my 16MB device.

mysqld has ~9MB unpacked, didn't made a file compare against mysql-5.1, I'll see if I can make a lite version, without all the stuff

I stripped down to ~6MB unpacked for mysqld and I think more is possible

@lucize I modified the php7 make file still this error coming

`Collected errors:

  • check_conflicts_for: The following packages conflict with libmariadb:
  • check_conflicts_for: libmysqlclient *
  • opkg_install_cmd: Cannot install package libmariadb.
  • satisfy_dependencies_for: Cannot satisfy the following dependencies for mariadb-server:
  • mariadb *
  • opkg_install_cmd: Cannot install package mariadb-server.
  • check_conflicts_for: The following packages conflict with libmariadb:
  • check_conflicts_for: libmysqlclient *
  • opkg_install_cmd: Cannot install package php7-mod-mysqli.
  • check_conflicts_for: The following packages conflict with libmariadb:
  • check_conflicts_for: libmysqlclient *
  • opkg_install_cmd: Cannot install package php7-mod-pdo-mysql.
    package/Makefile:64: recipe for target 'package/install' failed
    make[2]: * [package/install] Error 255
    make[2]: Leaving directory '/home/ahstanin/source'
    package/Makefile:106: recipe for target '/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_install' failed
    make[1]:
    [/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_install] Error 2
    make[1]: Leaving directory '/home/ahstanin/source'
    /home/ahstanin/source/include/toplevel.mk:207: recipe for target 'world' failed
    make: *
    * [world] Error 2`

are you sure you've overwritten the Makefile ? because you still have mariadb * dependency and in libs, make sure you don't have libmysqlclient selected, I made a clean compile with php7-pdo-mysql modified and it worked.
That's why a made some install modification for devel files because php searched for mysql libs in another place
try removing all files from tmp dir (rm -fr .* and the floder from there) maybe the Makefile is cached

@lucize can you please send the latest mariadb zip file? I trying to get the pull 4221, but git having problem with patching that. Thanks

remove the mariadb floder from utils, go back to the parent folder

wget https://github.com/openwrt/packages/pull/4221.patch
patch  -p1  < 4221.patch
rm -f < 4221.patch

anyway I'm preparing an option for lite package if you don't need all database engines integrated and plugins

@lucize that will be great as because I will run it on my router.

@lucize any idea where this error can cause?

checking for specified location of the MySQL UNIX socket... no checking for mysql_set_server_option in -lmysqlclient... no configure: error: wrong mysql library version or lib not found. Check config.log for more information. Makefile:556: recipe for target '/home/ahstanin/source/build_dir/target-mipsel_24kc_glibc/php-7.1.8/.configured_17deca3331cf96d6c88f34172b3577f7' failed make[3]: *** [/home/ahstanin/source/build_dir/target-mipsel_24kc_glibc/php-7.1.8/.configured_17deca3331cf96d6c88f34172b3577f7] Error 1 make[3]: Leaving directory '/home/ahstanin/source/feeds/packages/lang/php7' package/Makefile:109: recipe for target 'package/feeds/packages/php7/compile' failed make[2]: *** [package/feeds/packages/php7/compile] Error 2 make[2]: Leaving directory '/home/ahstanin/source' package/Makefile:105: recipe for target '/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_compile' failed make[1]: *** [/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/ahstanin/source' /home/ahstanin/source/include/toplevel.mk:207: recipe for target 'world' failed make: *** [world] Error 2

you need to remove the mysql version from staging tree, and maybe clean the php too

make package/mysql/clean
make package/php7/clean

and be sure that to erase mysql dir from
staging_dir/target-mipsel_24kc_glibc/usr/lib

@jammmet I added a lite option somehow based on mysql original Makefile
didn't had time to verify the functionality

-rw-r--r-- 1 build build  186101 Sep  4 20:26 libmariadb_5.5.57-1_x86_64.ipk
-rw-r--r-- 1 build build  448553 Sep  4 20:26 mariadb-client_5.5.57-1_x86_64.ipk
-rw-r--r-- 1 build build  984969 Sep  4 20:26 mariadb-client-extra_5.5.57-1_x86_64.ipk
-rw-r--r-- 1 build build 4349105 Sep  4 20:26 mariadb-server_5.5.57-1_x86_64.ipk

@lucize I had a new ubuntu installation and everything was new. I faced this error during compiling.

After newly installed ubuntu I installed building dependencies. I cloned source and patched your mariadb. Then I modified my php7 makefile, changed libmysqlclient with libmariadb. On make menuconfig changed C library implementation selected mariadb and others. libmysqlclient wasn't selected.

checking for MySQL UNIX socket location... no checking for mysql_config... /home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/usr/bin/mysql_config checking for mysql_commit in -lmysqlclient... no checking for mysql_commit in -lmysqlclient... (cached) no configure: error: PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information. Makefile:556: recipe for target '/home/ahstanin/source/build_dir/target-mipsel_24kc_glibc/php-7.1.9/.configured_8a46f42dcdb60136acb961c20740b0ae' failed make[3]: *** [/home/ahstanin/source/build_dir/target-mipsel_24kc_glibc/php-7.1.9/.configured_8a46f42dcdb60136acb961c20740b0ae] Error 1 make[3]: Leaving directory '/home/ahstanin/source/feeds/packages/lang/php7' package/Makefile:109: recipe for target 'package/feeds/packages/php7/compile' failed make[2]: *** [package/feeds/packages/php7/compile] Error 2 make[2]: Leaving directory '/home/ahstanin/source' package/Makefile:105: recipe for target '/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_compile' failed make[1]: *** [/home/ahstanin/source/staging_dir/target-mipsel_24kc_glibc/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/ahstanin/source' /home/ahstanin/source/include/toplevel.mk:207: recipe for target 'world' failed

do you have files in staging_dir/target-mipsel_24kc_glibc/usr/lib/mysql, especially libmysqlclient.a, libmysqlservices.a ?

I followed your old comment and ran this

make package/mysql/clean
make package/php7/clean

And cleared mysql from staging_dir/target-mipsel_24kc_glibc/usr/lib

And ran the make again and same error but this time there is no mysql folder on that location.

But did you re-download the patch? In the last commit I addressed this issue

@lucize yes, everything was fresh. Even the ubuntu installation was new.

Can you confirm that you have this

$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/mysql

entry in te mariadb Makefile?

@lucize sorry for late response, I found this lines there.

$(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/mysql $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal/

The error happening whiling compiling php, is this because we changed the php makefile?

your patch is not up to date!
the latest PR has this:

+define Build/InstallDev
 +  $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/mysql $(1)/usr/share/aclocal
 +  $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/
 +  ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/
 +  $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/
 +  # NOTE: needed for MySQL-Python
 +  $(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/
 +  $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
 +  $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/mysql
 +  $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal/
 +endef

@lucize I run bellow code, I thought it will get the latest patch.

wget https://github.com/openwrt/packages/pull/4221.patch patch -p1 < 4221.patch rm -f < 4221.patch

define Build/InstallDev
        $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/mysql $(1)/usr/share/aclocal
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/
        ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/
        # NOTE: needed for MySQL-Python
        $(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/mysql
        $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal/
endef

@lucize Looks like same to me

When you run make, is mariadb building before php7-pdo-mysql?

yes is the same, I read it on the mobile and didn't see because of text wrapping, I'll make a clean build and see if something is missing

@lucize Yes mariadb building before php-pdo and when comes building php7-pdo-mysql, it seems can't find mysql lib.

@lucize Here is my config file (mariadb and advance settings not selected)

I select mariadb -> mariadb-client and mariadb -> mariadb-server -> compressed

https://gist.github.com/ibnbd/f8497b94255e7234dea3a45c4e2e235a

be careful if lite is not selected the install will be quite large
I started a clean build, but using musl and I can't reproduce the missing libs, I'll test with your config, meanwhile I fixed the build with musl

checking for Firebird support for PDO... no
checking for MySQL support for PDO... yes, shared
checking for MySQL UNIX socket location... no
checking for mysql_config... /home/build/source/staging_dir/target-mipsel_24kc_musl/usr/bin/mysql_config
checking for mysql_commit in -lmysqlclient... yes
checking for PDO includes... checking for PDO includes... /home/build/source/build_dir/target-mipsel_24kc_musl/php-7.1.8/ext

@lucize I think you didn't push that new patch. I can't build with musl

so I made a clean sdk like this

git clone https://git.lede-project.org/source.git mariadb
cd mariadb/
./scripts/feeds update -a
./scripts/feeds install -a
cd feeds/packages
wget https://github.com/openwrt/packages/pull/4221.patch
patch  -p1  < 4221.patch
rm -f 4221.patch
ln -s ../../../feeds/packages/utils/mariadb ../../package/feeds/packages/
sed -i -- 's/libmysqlclient/libmariadb/g' lang/php7/Makefile
cd ../..
wget https://gist.github.com/ibnbd/f8497b94255e7234dea3a45c4e2e235a/raw/c7f5bed03ec4fa2db726b54f34f7cd060542c79e/.config 
make V=s -j35

(replace -j35 with number of real cpu cores, I have lots of them)
make sure 4221.patch file is not present before wget
I downloaded your config and made a build without issues

I've attached the results, but test the build also on OS X
ramips-mt7621.txt

-rw-r--r-- 1 build build  189255 Sep  9 14:45 libmariadb_5.5.57-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build  463815 Sep  9 14:45 mariadb-client_5.5.57-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build 4340486 Sep  9 14:45 mariadb-server_5.5.57-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build    3128 Sep  9 14:51 php7_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build 1431652 Sep  9 14:51 php7-cgi_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build    1321 Sep  9 14:51 php7-fastcgi_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build 1475644 Sep  9 14:51 php7-fpm_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build    3393 Sep  9 14:51 php7-mod-ctype_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   25918 Sep  9 14:51 php7-mod-curl_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   43294 Sep  9 14:51 php7-mod-dom_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build  261819 Sep  9 14:51 php7-mod-fileinfo_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   95759 Sep  9 14:51 php7-mod-gd_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   16417 Sep  9 14:51 php7-mod-iconv_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   15258 Sep  9 14:51 php7-mod-json_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   48619 Sep  9 14:51 php7-mod-openssl_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build   35404 Sep  9 14:51 php7-mod-pdo_7.1.9-1_mipsel_24kc.ipk
-rw-r--r-- 1 build build  177124 Sep  9 14:51 php7-mod-pdo-mysql_7.1.9-1_mipsel_24kc.ipk


-rw-r--r-- 1 build build  13M Sep  9 14:57 lede-ramips-mt7621-r6220-initramfs-kernel.bin
-rw-r--r-- 1 build build 1.6M Sep  9 14:57 lede-ramips-mt7621-r6220-squashfs-kernel.bin
-rw-r--r-- 1 build build  14M Sep  9 14:57 lede-ramips-mt7621-r6220-squashfs-rootfs.bin
-rw-r--r-- 1 build build  14M Sep  9 14:57 lede-ramips-mt7621-r6220-squashfs-sysupgrade.tar

make sure you have 002-disable_my_context_non_x86.patch in mariadb/patches folder

@lucize so you didn't modify the lang/php7 makefile?
Did you selected c library implementation from advance configuration?

I did, and made a make of your gist (that is using musl)
sed -i -- 's/libmysqlclient/libmariadb/g' lang/php7/Makefile

@lucize I installed successfully on my router but mariadb/mysql not running.

mysql_install_db --force this command returning with FATAL ERROR: Could not find ./bin/my_print_defaults

mysql_install_db --force --basedir=/usr this command returning with FATAL ERROR: Could not find /usr/share/mysql/mysql_performance_tables.sql

/usr/share/mysql/ has
english,mysql_system_tables.sql,fill_help_tables.sql,mysql_system_tables_data.sql

The config file is a dummy one, edit it for your needs, also it is trying to create a 2gb file database so maybe you are out of space, I left it like that so you would be forced to edit it

I changed these, do I have to change anything else? mnt this location is 16GB
datadir = /mnt/mariadb/mysql
tmpdir = /mnt/mariadb/tmp

if you don't want to preallocate 2GB change this innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend for the rest I can't say, search google for low power device configurations

$(CP) $(PKG_INSTALL_DIR)/usr/bin/my_print_defaults $(1)/usr/bin/ is not in bin I'll see what is calling it maybe it needs changed in /usr/bin and performance_tables.sql is missing from lite package, but maybe is not needed

@lucize yes this file in this location /usr/bin/my_print_defaults but mysql_install_db --force searching it at ./bin/my_print_defaults

the startup script can be edited or you can create a symlink, as for missing sql file, I didn't had time to test the lite package, try to comment the line that is calling the performance.sql. I'll try it later but I think you should be able to fix it without reinstall

also you can verify mysql_install_db script and adjust it

@lucize I didn't knew about startup script so I modified mysql_install_db there were 5 different places needed modification. Finally it's online :) thank you very much for you help and support. 馃憤 YOU ARE THE BEST

but.. did you tried building it on OS X ? 馃構

@lucize no I didn't tried, OSX had problem with compiling at first stage.

@lucize just tried with OSX again for research, compiling failed at

make[3]: Entering directory `/Users/ahstanin/mariadb/feeds/packages/utils/mariadb'
rm -f /Users/ahstanin/mariadb/build_dir/target-mipsel_24kc_musl/mariadb-5.5.57/.built
touch /Users/ahstanin/mariadb/build_dir/target-mipsel_24kc_musl/mariadb-5.5.57/.built_check
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -C "/Users/ahstanin/mariadb/build_dir/target-mipsel_24kc_musl/mariadb-5.5.57" SUBDIRS="include" DESTDIR="/Users/ahstanin/mariadb/build_dir/target-mipsel_24kc_musl/mariadb-5.5.57/ipkg-install"
[  0%] Built target abi_check
[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  3%] Built target readline
[  3%] Built target mytap
[  4%] Built target gen_dtrace_header
[  9%] Built target strings
[  9%] Building C object mysys/CMakeFiles/mysys.dir/mf_keycache.c.o
{standard input}: Assembler messages:
{standard input}:5097: Error: unknown pseudo-op: `.reference'
{standard input}:5128: Error: unknown pseudo-op: `.reference'
{standard input}:5216: Error: unknown pseudo-op: `.reference'
{standard input}:5230: Error: unknown pseudo-op: `.reference'
{standard input}:5818: Error: unknown pseudo-op: `.reference'
{standard input}:5836: Error: unknown pseudo-op: `.reference'
{standard input}:6488: Error: unknown pseudo-op: `.reference'
{standard input}:6519: Error: unknown pseudo-op: `.reference'
{standard input}:6624: Error: unknown pseudo-op: `.reference'
{standard input}:6632: Error: unknown pseudo-op: `.reference'
{standard input}:6731: Error: unknown pseudo-op: `.reference'
{standard input}:6740: Error: unknown pseudo-op: `.reference'
{standard input}:6815: Error: unknown pseudo-op: `.reference'
{standard input}:6823: Error: unknown pseudo-op: `.reference'
{standard input}:6949: Error: unknown pseudo-op: `.reference'
{standard input}:6968: Error: unknown pseudo-op: `.reference'
make[6]: *** [mysys/CMakeFiles/mysys.dir/mf_keycache.c.o] Error 1
make[5]: *** [mysys/CMakeFiles/mysys.dir/all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [/Users/ahstanin/mariadb/build_dir/target-mipsel_24kc_musl/mariadb-5.5.57/.built] Error 2
make[3]: Leaving directory `/Users/ahstanin/mariadb/feeds/packages/utils/mariadb'
make[2]: *** [package/feeds/packages/mariadb/compile] Error 2
make[2]: Leaving directory `/Users/ahstanin/mariadb'
make[1]: *** [/Users/ahstanin/mariadb/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Users/ahstanin/mariadb'
make: *** [world] Error 2

@lucize I installed gcc using brew but not sure how to use this with LEDE, because xcode's gcc still there.

gcc --version

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

gcc-7 --version

gcc-7 (Homebrew GCC 7.2.0) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

As you can see brew gcc installed as gcc-7, how to use this to compile our codes...!

Thanks

I think it's not using gcc but cmake, there is an entry in host/compile where you can pass compile arguments, I had osx once installed in vm, I'll see if I can run it again

@lucize oh okay, honestly I know nothing about programming. Thanks to you :) I tried many new things.

Hi all,

MariaDB is in master and also in upcoming openwrt-18.06. Maybe you could give that a try and report any build issues on Mac. I would then try to fix them. If there's no issue maybe you can close this issue.

Kind regards,
Seb

@hnyman @thess
I think we can close this, CC is deprecated and if this is still an issue on newer releases a new issue ticket should be created.

Ping
@dibdot

@yousong
Can you close this one?

Was this page helpful?
0 / 5 - 0 ratings