Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]MongoDB on Raspberry Pi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 10:59 am    Post subject: [solved]MongoDB on Raspberry Pi Reply with quote

Hi at all,

I got my first Pi a few days ago. Installing Gentoo worked well without any issues.
But now I hang at installing MongoDB. I tried different versions including 3.2.16 (last 32-bit version)

Last output fo portage is:
Code:
Compiling build/opt/mongo/scripting/mozjs/base.o
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:60:1: fatal error: js-config.h: No such file or directory
 #endif
 ^
compilation terminated.
scons: *** [build/opt/mongo/scripting/mozjs/base.o] Error 1
scons: building terminated because of errors.
 * ERROR: dev-db/mongodb-3.2.16::gentoo failed (compile phase):
 *   escons failed.
 *
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 3386:  Called escons 'CC=armv7a-hardfloat-linux-gnueabi-gcc' 'CXX=armv7a-hardfloat-linux-gnueabi-g++' '--disable-warnings-as-errors' '--use-system-boost' '--use-system-pcre' '--use-system-snappy' '--use-system-stemmer' '--use-system-yaml' '--use-system-zlib' '--ssl' 'core' 'tools'
 *   environment, line 1637:  Called die
 * The specific snippet of code:
 *                   die -n "escons failed."
 *
 * If you need support, post the output of `emerge --info '=dev-db/mongodb-3.2.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mongodb-3.2.16::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-db/mongodb-3.2.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mongodb-3.2.16/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mongodb-3.2.16/work/mongodb-src-r3.2.16'
 * S: '/var/tmp/portage/dev-db/mongodb-3.2.16/work/mongodb-src-r3.2.16'



Anyone knows how to fix this?

code tags added for ease of reading -- NeddySeagoon


Last edited by Role82 on Wed Oct 11, 2017 12:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Oct 06, 2017 11:27 am    Post subject: Reply with quote

Role82,

Welcome to gentoo.

That portage message just says 'it failed' and gives some instructions on the information needed to understand the issue.

Make friends with wgetpaste and put /var/tmp/portage/dev-db/mongodb-3.2.16/temp/build.log onto a pastebin site.
Its too big for a forum post.

At first sight
Code:
 /usr/include/stdc-predef.h:60:1: fatal error: js-config.h: No such file or directory
appears to be the problem.
I don't have mongodb installed and
Code:
equery b js-config.h
shows I don't have that file either.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Fri Oct 06, 2017 11:29 am    Post subject: Reply with quote

Try upgrading "dev-util/scons" for a start, see similar thread below

https://forums.gentoo.org/viewtopic-t-955296-view-next.html?sid=a8ca014ca6b29a2035f5097dd3054612
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 11:32 am    Post subject: Reply with quote

I emerged wgetpaste.
Here is the buildlog:
https://paste.pound-python.org/show/dsra1hilqDFU5dqSSIHf/
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Fri Oct 06, 2017 11:40 am    Post subject: Reply with quote

It could be tahat there is no support in the build for the arm arch, similar issues here:

https://jira.mongodb.org/browse/SERVER-22810
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 11:58 am    Post subject: Reply with quote

Indeed, there is no support for arm. But I found on google, that mongodb runs on ubuntu (32-bit) on a Raspberry. The only difference is, that I have to build it, since I'm using gentoo.

Is there a way to install mongodb from binaries on my Raspberry running gentoo?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Oct 06, 2017 12:34 pm    Post subject: Reply with quote

Role82,

Why did you pick mongodb-3.2.16 ?
Version 3.4.7 is in the tree and none of them have KEYWORD=arm.
Code:
$ eix mongodb
* dev-db/mongodb
     Available versions:  2.6.12 3.0.14 (~)3.0.15 (~)3.2.12 (~)3.2.13 (~)3.2.16 (~)3.4.3 (~)3.4.4 (~)3.4.6 (~)3.4.7


If ubuntu can build it, so can Gentoo. You need to discover what patches ubuntu applies and use them too.
As the ebuilds use EAPI 6, applying build time patches is easy. Portage will do it.

The error is a missing js-config.h header, or its there but not being found for some reason.

The ubuntu binary can be installed but may need different versions of dependencies than those provided by Gentoo.
There be dragons. Its very much a last ditch thing to try.

First, try the newest dev-db/mongodb in the tree, your problem may have been fixed there.

-- edit --
My 64 bit Pi 3 has

Code:
equery b js-config.h
 * Searching for js-config.h ...
dev-lang/spidermonkey-1.8.5-r6 (/usr/include/js/js-config.h)
mail-client/thunderbird-52.2.0 (/usr/include/thunderbird/js-config.h)


It may mean that the ebuild should depend on dev-lang/spidermonkey but doesn't.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Fri Oct 06, 2017 12:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 12:54 pm    Post subject: Reply with quote

I tried version 3.4.7. This version doesn't even begin to build.

Here is my buildlog: https://paste.pound-python.org/show/2NB6fcS82BeHp6GX5oBH/
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8718
Location: ~Brussels - Belgique

PostPosted: Fri Oct 06, 2017 12:55 pm    Post subject: Reply with quote

Code:
emerge --info
please ;)

Seems your GCC version is too old.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 12:56 pm    Post subject: Reply with quote

Here it is:

Code:
Portage 2.3.0 (python 3.4.3-final-0, hardened/linux/arm/armv7a, gcc-4.9.4, glibc-2.23-r4, 4.9.52-v7+ armv7l)
=================================================================
System uname: Linux-4.9.52-v7+-armv7l-with-gentoo-2.3
KiB Mem:      949572 total,     46192 free
KiB Swap:    2097148 total,   2093684 free
Timestamp of repository gentoo: Fri, 06 Oct 2017 00:45:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.21.7::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.28.1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

raw
    location: /var/lib/layman/raw
    sync-type: laymansync
    sync-uri: https://github.com/mahatma-kaganovich/raw.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl arm armv5te armv6 armv6t2 berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 modules ncurses nls nptl openmp pam pax_kernel pcre pic pie readline seccomp session ssl ssp tcpd unicode urandom xattr xtpax zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Oct 06, 2017 1:00 pm    Post subject: Reply with quote

Role82,

You need to upgrade to gcc-5.x and rebuild all the C++ code you have installed.
Read the news item.

Code:
Pi3_64 ~ # equery b js-config.h
 * Searching for js-config.h ...
dev-lang/spidermonkey-1.8.5-r6 (/usr/include/js/js-config.h)
mail-client/thunderbird-52.2.0 (/usr/include/thunderbird/js-config.h)


Maybe the ebuild is missing a dependency on dev-lang/spidermonkey?

Code:
ACCEPT_KEYWORDS="arm"
may be a bit conservative as arm code moves quickly and the gentoo arm project may not keep up.

Are you running another Gentoo?
Cross distcc can take the pain out of building on the Pi, for lots of packages anyway.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Fri Oct 06, 2017 1:10 pm    Post subject: Reply with quote

After switching the gcc version, does
Code:
emerge world

do the rest?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Fri Oct 06, 2017 1:25 pm    Post subject: Reply with quote

Role82,

Not in this case, no. You should have a news item.
Code:
eselect news list
...
GCC 5 Defaults to the New C++11 ABI
...

Do what it says there first, then you can update,
Code:
emerge -uDUav @world

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Mon Oct 09, 2017 10:38 am    Post subject: Reply with quote

I changed the gcc version to 5.4.0.
This didn't fix the problem.
Then I followed this guide: http://www.clarenceho.net/2015/12/building-mongodb-30x-for-arm-armv7l.html?m=1
The installation worked without problems. But now portage thinks, that mongodb isn't installed at all, because it wasn't emerged.

Is there a way to tell portage, that it is installed, and where it can find it?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Mon Oct 09, 2017 10:47 am    Post subject: Reply with quote

Role82,

Read about /etc/portage/package.provided in
Code:
man portage

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Role82
n00b
n00b


Joined: 06 Oct 2017
Posts: 20

PostPosted: Wed Oct 11, 2017 12:34 pm    Post subject: Reply with quote

Because it finally worked to install mongodb, I'll mark this thread as solved.
But there seems to be no way to install mongodb on a raspberry pi using portage.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum