Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Firstly I've tried to perform step by step building of MongoDB on my vps with FreeBSD 8.2 on it. I've faced problem with the last step of building it:

vm3578# scons .
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 6 6 'final' 0
Checking whether the C++ compiler worksyes
Checking for C library stdc++... yes
Checking for C++ header file boost/filesystem/operations.hpp... yes
Checking for C library boost_system-mt... no
Checking for C library boost_system... yes
Checking for C library boost_thread-mt... no
Checking for C library boost_thread... yes
Checking for C library boost_filesystem-mt... no
Checking for C library boost_filesystem... yes
Checking for C library boost_program_options-mt... no
Checking for C library boost_program_options... no
can't find or link against library ['boost_program_options-mt', 'boost_program_options'] in ['/usr/local/lib']
see config.log for more information

But this lib is there:

    vm3578# ls /usr/local/lib
apr-util-1                        libdb41_cxx.a                     libpgport.a
apr.exp                                     libpgtypes.a
aprutil.exp                                      libdb4_cxx.a            
boost_program_options                        libplc4.a         
compat                                  libplds4.a
default.sfx                       libdbus-1.a                       libpng.a
gettext                                     libpq.a
gio                               libecpg.a               
libICE.a                                      libpthread-stubs.a                         libecpg_compat.a                                                                          libexecinfo.a                     libpython2.6.a                                                                    libexpat.a                        libruby-static.a
libSM.a                                        libruby18-static.a                                                                                libexslt.a                        libsasl2.a
libX11-xcb.a                                                                                          libfam.a                          libsicudata.a
libX11.a                                         libsicui18n.a                                        libsicuio.a                                      libsicule.a                       libfcgi++.a                       libsiculx.a
libXau.a                                      libsicutest.a                                     libsicutu.a                                   libsicuuc.a                       libfcgi.a                         libslang.a                                                                                                        libfreetype.a           
libXaw6.a                                   libsnappy.a                                                                    libgamin-1.a            
libXaw7.a                                    libsqlite3.a                                                                      libgamin_shared.a       
libXdmcp.a                        libgcrypt.a                       libt1.a                                                                      
libXext.a                                  libt1x.a                        libgdbm.a                                                                     
libXmu.a                                      libtcl85.a                                                                      libtclstub85.a
libXmuu.a                         libgettextpo.a                    libxcb-composite.a                                                                 
libXp.a                            libxcb-damage.a                                                                        libgio-2.0.a            
libXpm.a                                     libxcb-dpms.a                                                                         libglib-2.0.a           
libXt.a                                     libxcb-dri2.a                                                                          libgmodule-2.0.a        
libapr-1.a                               libxcb-glx.a                                                           libgmp.a                
libaprutil-1.a                                   libxcb-randr.a                                                              libgmpxx.a              
libasprintf.a                                  libxcb-record.a                                                              libgobject-2.0.a        
libbfd.a                                 libxcb-render.a                      
libboost_date_time.a                      libgpg-error.a                              libxcb-res.a
libboost_filesystem.a                               libgthread-2.0.a        
libboost_graph.a                         libxcb-screensaver.a                        
libboost_iostreams.a              libiberty.a                          libiconv.a                        libxcb-shape.a              
libboost_math_c99.a                                                        libxcb-shm.a
libboost_math_tr1.a                       libxcb-sync.a                       
libboost_math_tr1f.a                                 libxcb-xevie.a              
libboost_prg_exec_monitor.a                                       libxcb-xf86dri.a
libboost_python.a                         libxcb-xfixes.a                           
libboost_random.a                                       libxcb-xinerama.a
libboost_serialization.a          libidn.a                          libxcb-xinput.a                           
libboost_signals.a                libintl.a                                            libxcb-xprint.a                 
libboost_system.a                                   libjpeg.a                                           libxcb-xtest.a
libboost_thread.a                                                                    libxcb-xv.a
libboost_unit_test_framework.a    libltdl.a                                           
libboost_wave.a                               libxcb-xvmc.a                  liblzma.a                                   
libboost_wserialization.a                                    libxcb.a      libmcrypt               
libbz2.a                          libmcrypt.a                                                                           libxml2.a
libc-client4.a                                       libmhash.a                                  
libcharset.a                                 libxslt-plugins                     libmpfr.a                         libxslt.a                                                
libcheck.a                                                 libnspr4.a                        mysql                                    perl5                                php
libcurl.a                         libopcodes.a                      postgresql                                   proftpd                        libpcre.a                         python2.6                                    ruby                                    rvm                                sasl2                      libpcrecpp.a                      scons-2.0.1                               slang
libdb4.a                                     tcl8                                  tcl8.5                       libpcreposix.a                    xemacs
libdb41.a                                  zsh              

boost_program_options and are the symlincs, with which i've tried to fix the problem. So, is there a way to link them?

Installation from ports is facing another problem when it's crushing after make install:

sinksource.o client/gridfs.o tools/tool.o tools/dump.o -L/usr/local/lib -lpcrecpp -ljs -lstdc++ -lboost_system -lboost_thread -lboost_filesystem -lboost_program_options-mt -lexecinfo -lexecinfo -lexecinfo
/usr/local/bin/ld: db/matcher.o: undefined reference to symbol 'pcre_config'
/usr/local/bin/ld: note: 'pcre_config' is defined in DSO /usr/local/lib/ so try adding it to the linker command line
/usr/local/lib/ could not read symbols: Invalid operation
collect2: ld returned 1 exit status
scons: *** [mongodump] Error 1
scons: building terminated because of errors.
*** Error code 2

Stop in /usr/ports/databases/mongodb.
*** Error code 1

Stop in /usr/ports/databases/mongodb.

Any idea how to add 'pcre_config' to the linker command line?

As well, I've also tried the pkg_add -r mongodb installation, it went well, installed all the dependencies, but when I'm trying to run mongod command to start it, it just fails without any backtrace:

~ mongod 
mongod --help for help and startup options
Sun Jan 15 21:52:33 terminate() called, printing stack:
Sun Jan 15 21:52:33 Got signal: 6 (Abort trap: 6).

Sun Jan 15 21:52:33 Backtrace:

Any suggestions?

share|improve this question
Is this a new or old VM? Looks like your libraries and includes are out of sync, which can happen over time with many installations/upgrades/etc. –  Chris S Jan 16 '12 at 1:06
old one, yup. is there any common way to sync them? –  Anton Axentyuk Jan 16 '12 at 2:12
make -C /usr/ports/databases/mongodb install –  SaveTheRbtz Jan 17 '12 at 12:06
it results with the same /usr/local/bin/ld: db/matcher.o: undefined reference to symbol 'pcre_config' error –  Anton Axentyuk Jan 17 '12 at 12:29

1 Answer 1

You should try to install from the ports (/usr/ports/databases/mongodb) - there is a patch for scons there.

MongoDB (2.0.2) is working for me without any problems on 8.2

I can send you compiled libraries if you want :)

share|improve this answer
You mean to run scons command from /usr/ports/databases/mongodb? I've tried, but it gives me scons: *** No SConstruct file found.. I've tried scons -f files/patch-SConstruct, but it results with SyntaxError: invalid syntax –  Anton Axentyuk Jan 16 '12 at 2:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.