Bacula-users

Re: [Bacula-users] undefined references to init_msg and d_msg

2015-07-04 02:46:46
Subject: Re: [Bacula-users] undefined references to init_msg and d_msg
From: Kern Sibbald <kern AT sibbald DOT com>
To: Ingo Janetzki <ingo AT dosco DOT de>, bacula-users AT lists.sourceforge DOT net
Date: Sat, 04 Jul 2015 08:41:25 +0200
Hello,

You seem to have a somewhat old set of configure options, and some that
are not needed and could possibly (unlikely) cause problems.

>>From my point of view, you should not have any of the following options:

- --libdir
- --enable-bwx-console
- --with-x

These days, SQLite3 is no longer really supported, we keep the code, but
it is very slow compared to MySQL or PostgreSQL.  You can build with it,
but generally the performance is not good.  I recommend MySQL for small
installations unless you are PostgreSQL savy -- PostgreSQL performs much
better than MYSql for larger installations, but is slightly harder to
setup and tune.

You might check your libtool call to see if it is correct.
Mine looks like:

/home/kern/bacula/k/bacula/libtool --silent --tag=CXX --mode=link g++
-m64 -Wl,-rpath,/home/kern/bacula/depkgs-qt/qt4/lib -o bat obj/main.o
obj/bat_conf.o obj/mainwin.o obj/qstd.o obj/pages.o obj/dircomm.o
obj/dircomm_auth.o obj/console.o obj/prerestore.o obj/restore.o
obj/brestore.o obj/label.o obj/relabel.o obj/mount.o obj/run.o
obj/runcmd.o obj/estimate.o obj/prune.o obj/select.o obj/textinput.o
obj/medialist.o obj/mediaview.o obj/mediaedit.o obj/joblist.o
obj/clients.o obj/storage.o obj/content.o obj/fileset.o obj/joblog.o
obj/job.o obj/jobs.o obj/restoretree.o obj/help.o obj/mediainfo.o
obj/dirstat.o obj/clientstat.o obj/storstat.o obj/fmtwidgetitem.o
obj/comboutil.o obj/moc_mainwin.o obj/moc_dircomm.o obj/moc_console.o
obj/moc_restore.o obj/moc_label.o obj/moc_relabel.o obj/moc_mount.o
obj/moc_run.o obj/moc_select.o obj/moc_textinput.o obj/moc_medialist.o
obj/moc_mediaview.o obj/moc_mediaedit.o obj/moc_joblist.o
obj/moc_clients.o obj/moc_storage.o obj/moc_content.o obj/moc_fileset.o
obj/moc_joblog.o obj/moc_job.o obj/moc_jobs.o obj/moc_restoretree.o
obj/moc_help.o obj/moc_mediainfo.o obj/moc_dirstat.o
obj/moc_clientstat.o obj/moc_storstat.o obj/qrc_main.o   
-L/home/kern/bacula/depkgs-qt/qt4/lib -L../lib -lbaccfg -lbac
-L../findlib -lbacfind -lssl -lcrypto -lQtGui
-L/home/kern/bacula/depkgs-qt/qt4/lib -L/usr/X11R6/lib64 -lpng
-lgobject-2.0 -lSM -lICE -lfontconfig -lfreetype -lXext -lX11 -lQtCore
-lz -lm -ldl -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread
-L../lib/.libs -L../findlib/.libs

I suspect that the most likely cause of the problem is that for some
reasons (e.g. you typed "make install" instead of "make; make install")
your libraries were not correctly built prior to trying to link bat.

You must do:

./configure --<arguments>
make  (or make -jnn where nn is the number of your CPUs)

sudo root
make install

You might look at the manual.  It is all documented there ...

I personally *strongly* recommend using the file placements (install
locations) in the examples in the manual, because they put Bacula in a
well defined place that makes backing it up (and more important
restoring it) far easier.  Your current config sprays the Bacula files
all over your filesystem, which is very unfriendly for disaster recovery.

Best regards,
Kern

Best regards,
Kern



On 03.07.2015 14:27, Ingo Janetzki wrote:
> Hi folkes,
>
> first, hello to all since I just subscribed a few minutes ago.
>
> After several years of using bacula, I decided that it is time to upgrade from
> my bacula 5.2.13 to the current 7.0.5 on my system with opensuse 13.1.
>
> So, I cloned the git repository and used my standard set of configuration 
> options,
> which worked very well for all 5.x versions of bacula:
>
> #./configure --prefix=/usr/local --libdir=/usr/lib64 --sysconfdir=/etc/bacula 
> #    --with-plugindir=/etc/bacula/plugins --with-scriptdir=/etc/bacula 
> --datarootdir=/usr/share 
> #    --enable-batch-insert --disable-ipv6 --enable-bat --enable-bwx-console 
> --enable-tray-monitor 
> #    --with-sqlite3 --with-x --with-archivedir=/local/backup/bacula/archive 
> --with-working-dir=/var/lib/bacula/working 
> #    --with-db-name=bacula1 --with-db-user=bacula --with-db-password=XXXX
>
> The configure seems to run fine, but the following make always gives problems 
> with the creation of bat;:
>
> g++ -c -pipe -g -D_REENTRANT -Wall -W -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB 
> -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore 
> -I/usr/include/QtGui -I/usr/include -I.. -I. -Iconsole -Irestore -Iselect 
> -Imoc -Iui -o obj/qrc_main.o qrc_main.cpp
> /local/software/bacula/bacula/bacula/libtool --silent --tag=CXX --mode=link 
> g++  -o bat obj/main.o obj/bat_conf.o obj/mainwin.o obj/qstd.o obj/pages.o 
> obj/dircomm.o obj/dircomm_auth.o obj/console.o obj/prerestore.o obj/restore.o 
> obj/brestore.o obj/label.o obj/relabel.o obj/mount.o obj/run.o obj/runcmd.o 
> obj/estimate.o obj/prune.o obj/select.o obj/textinput.o obj/medialist.o 
> obj/mediaview.o obj/mediaedit.o obj/joblist.o obj/clients.o obj/storage.o 
> obj/content.o obj/fileset.o obj/joblog.o obj/job.o obj/jobs.o 
> obj/restoretree.o obj/help.o obj/mediainfo.o obj/dirstat.o obj/clientstat.o 
> obj/storstat.o obj/fmtwidgetitem.o obj/comboutil.o obj/moc_mainwin.o 
> obj/moc_dircomm.o obj/moc_console.o obj/moc_restore.o obj/moc_label.o 
> obj/moc_relabel.o obj/moc_mount.o obj/moc_run.o obj/moc_select.o 
> obj/moc_textinput.o obj/moc_medialist.o obj/moc_mediaview.o 
> obj/moc_mediaedit.o obj/moc_joblist.o obj/moc_clients.o obj/moc_storage.o 
> obj/moc_content.o obj/moc_fileset.o obj/moc_joblog.o obj/moc_job.o 
> obj/moc_jobs.o obj/moc_restoretree.o obj/moc_help.o obj/moc_mediainfo.o 
> obj/moc_dirstat.o obj/moc_clientstat.o obj/moc_storstat.o obj/qrc_main.o    
> -L/usr/lib64 -L../lib -lbaccfg -lbac -L../findlib -lbacfind -lssl -lcrypto 
> -lQtGui -L/usr/lib64 -L/usr/X11R6/lib -lQtCore -lpthread -L../lib/.libs 
> -L../findlib/.libs 
> obj/main.o: In function `main':
> /local/software/bacula/bacula/bacula/src/qt-console/main.cpp:90: undefined 
> reference to `init_msg(JCR*, MSGS*, char* (*)(JCR*, char const*))'
> obj/bat_conf.o: In function `save_resource(int, RES_ITEM*, int)':
> /local/software/bacula/bacula/bacula/src/qt-console/bat_conf.cpp:332: 
> undefined reference to `d_msg(char const*, int, long, char const*, ...)'
> obj/mainwin.o: In function `MainWin::treeItemClicked(QTreeWidgetItem*, int)':
> /local/software/bacula/bacula/bacula/src/qt-console/mainwin.cpp:444: 
> undefined reference to `d_msg(char const*, int, long, char const*, ...)'
> obj/dircomm_auth.o: In function `DirComm::authenticate_director(JCR*, 
> DIRRES*, CONRES*, char*, int)':
> /local/software/bacula/bacula/bacula/src/qt-console/bcomm/dircomm_auth.cpp:142:
>  undefined reference to `d_msg(char const*, int, long, char const*, ...)'
> /local/software/bacula/bacula/bacula/src/qt-console/bcomm/dircomm_auth.cpp:152:
>  undefined reference to `d_msg(char const*, int, long, char const*, ...)'
> obj/restore.o: In function `restorePage::restorePage(int)':
> /local/software/bacula/bacula/bacula/src/qt-console/restore/restore.cpp:31: 
> undefined reference to `d_msg(char const*, int, long, char const*, ...)'
> obj/restore.o:/local/software/bacula/bacula/bacula/src/qt-console/restore/restore.cpp:384:
>  more undefined references to `d_msg(char const*, int, long, char const*, 
> ...)' follow
> collect2: error: ld returned 1 exit status
> make[1]: *** [bat] Error 1
> make[1]: Leaving directory 
> `/local/software/bacula/bacula/bacula/src/qt-console'
>
> Obviously, the linker has problems to find init_msg and d_msg. 
>
> Unfortunatly, I'm not able to past this error. I have no idea. If I remove 
> the --enable-bat
> from my configuration options, everything compiles ok. But the point is that 
> I really
> would like to use bat. Yes, I know that there is a new thing called baculum.
>
> So, anybody who has some good advice? Would appreciate it.
>
> Best wishes, Ingo
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>