Jump to content

tbb build ( honor CXX variable ) and install DESTDIR= issues


Guest Alexstrasza

Recommended Posts

@ Revision 9253

1) for now tbb Makefile does not honor CC and CXX variables, and always attempting to build with g++ ,

which can be an incorrect choice in some (uncommon) environments

2) when ./configure is ran with --enable-builtin-ace=no

then tbb is the first thing to install and it fails if target directories are not yet created

executing make install DESTDIR=/tmp/mangos/build/installed :

Making install in tbb

make[2]: Entering directory `/tmp/mangos/build/dep/tbb'

make[3]: Entering directory `/tmp/mangos/build/dep/tbb'

/bin/ginstall -c /tmp/mangos/build/dep/tbb/lib*.so* /tmp/mangos/build/installed/opt/warcraft/lib

/bin/ginstall: cannot stat `/tmp/mangos/build/dep/tbb/lib*.so*': No such file or directory

make[3]: *** [install-exec-local] Error 1

make[3]: Leaving directory `/tmp/mangos/build/dep/tbb'

make[2]: *** [install-am] Error 2

make[2]: Leaving directory `/tmp/mangos/build/dep/tbb'

make[1]: *** [install-recursive] Error 1

make[1]: Leaving directory `/tmp/mangos/build/dep'

make: *** [install-recursive] Error 1

when using internal ACE , then DESTDIR's prefix/lib is created by ACE installation

Link to comment
Share on other sites

i dont have problems with building or iinstallation now, i just notice how things should work at its perfection )

of course make been ran and it has no issues , except that TBB been built with g++ instead of predefined CXX,

a trick with redefining PATH variable been used, my default system gcc and g++ is 32 bit compiler, while i compile mangos in 64 bit mode with CC=/usr/local/gcc.4.4/bin/gcc and CXX=/usr/local/gcc-4.4/bin/g++

make install DESTDIR=/some/place

is used instead of make install (without DESTDIR) to ease package creation or otherwise transfer produced binaries to another machine for example, it is a good taste to support CC CXX and DESTDIR settings in unix makefiles (i ve created a report about TBB DESTDIR before, and it was fixed (thanks!) but now i'd like to re-use system wide installed libACE ( 5.7.5 work fine in 64 bit mode !)

and while make install, first thing to install is TBB, by the way make install without DESTDIR= (simple way) should fail too, if installing mangos in an empty prefix, where lib/ directory doesnt exist yet

from man install:

-D create all leading components of DEST except the last, then copy SOURCE to DEST

adding this flag to ginstall call perhaps will fix the 2nd issue

changing g++ in tbb makefile to $(CXX) will fix the first, trivial patch. TY for attention.

Link to comment
Share on other sites

another *nix remark:

now libraries are installed into $PREFIX/lib

while a better way is to check which LIBDIRSUFFIX is used, it can be "" and directory should be named lib (32 bit systems), "" and lib (a bit older 64 bit systems), "64" and lib64 (newer 64 bit), "32" and lib32 (32 bit multilib suffix for 32 bit libraries on 64 bit systems)

an user can use --libdir=/some/path/lib switch to configure , but it will be good if it will be autodetected, especially for those people who use --prefix=/usr or /usr/local ( i use /opt/warcraft with nothing else but mangos and related data here )

Link to comment
Share on other sites

Also one note with DESTDIR and building in general at *nix: very wrong choice have object dir build directory in to sources dir.

It is not an issue currently, as mangos doesnt let to run ./configure in same dir where sources are located:

configure: error:

Please configure and build in a directory other than the

top-level source directory. This is needed because a lot

of maintainers tend to break parallel build trees

(a.k.a. VPATH builds). This is kinda real ensurance they

will not do it (by enforcing everybody to do VPATH builds).

For example, try the following from the top-level source

directory:

mkdir objdir

cd objdir

../configure

make

This will create a build space in the directory 'objdir' and

start a build in that directory.

If however you realy want to disable this error,

use --enable-maintainer-mode switch.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use