Hi Hugo,
I re-read your post and spent some more time hacking and I am happy to report that I have successfully built Palo on MacOSX 10.8.2!
Here are the steps to make it work. I hacked my way around one issue and guessed my way through the other -- hopefully correctly. :-)
1. Download the palo_server_988.zip source code
2. unzip using jar xvf palo_server_988.zip (I have seen other variants. Does anyone know if this is the best set of options to use?)
3. cd to the server_export directory and chmod -R 750 * (
http://gvlt.wordpress.com/2008/05/01/com…lo-on-mac-os-x/); I have also seen chmod 755 -- not my area of expertise, but 750 is what I used and it works.
4. Boost 1.52.0 (I did not end up using the homebrew version, although there is no reason you couldn't. I had a heck of a time with linking the thread library and ended up doing ./bootstrap.sh --prefix=/usr/local/boost_1_52_0
The configure script sees the Boost headers but not the thread library, just as you indicated would be the case.
checking boost/thread.hpp usability... yes
checking boost/thread.hpp presence... yes
checking for boost/thread.hpp... yes
checking for the Boost thread library... no
configure: error: Could not find the flags to link with Boost thread
This is where I was stuck and did not know the correct syntax to use. I did not change anything in my .bash_profile except adding the path for the boost libraries:
/usr/local/boost_1_52_0/stage/lib
All of the options and paths are passed on the command line, which makes it pretty ugly.
5. Enter the big ugly configure command below.
./configure --prefix=/usr/local/palo-server --with-boost=/usr/local/boost_1_52_0 BOOST_ROOT="/usr/local/boost_1_52_0" CPPFLAGS="-I/usr/local/boost_1_52_0" LDFLAGS="-L/usr/local/boost_1_52_0/stage/lib" LIBS="-lboost_thread -lboost_system" BOOST_THREAD_LDFLAGS="-L /usr/local/boost_1_52_0/stage/lib" BOOST_THREAD_LIBS="-lboost_thread -lboost_system" BOOST_CPPFLAGS="-I/usr/local/boost_1_52_0" DYLD_LIBRARY_PATH="/usr/local/boost_1_52_0/stage/lib"
6. type 'make && make install'
7. Copy GNU/Linux client Data directory and copy start/stop scripts
8. Copy/move palo.ini file and set values. The palo.ini file had to be at the same level as the palo executable to make it work.
file location details:
boost is in /usr/local/Boost_1_52_0
the source code directory is in /usr/local/server_export
the compiled Boost thread library is at /usr/local/boost_1_52_0/stage/lib/libboost_thread.dylib
The build issues and how I got around them:
1. There was an ambiguity issue at line 111 of Olap/Engine.cpp
Olap/Engine.cpp: In function ‘void* palo::ecalloc(size_t, size_t, palo::EMemoryContext*, bool)’:
Olap/Engine.cpp:111: error: call of overloaded ‘convertToString(long unsigned int)’ is ambiguous
./Collections/StringUtils.h:185: note: candidates are: static std::string palo::StringUtils::convertToString(double)
./Collections/StringUtils.h:200: note: static std::string palo::StringUtils::convertToString(int64_t)
./Collections/StringUtils.h:215: note: static std::string palo::StringUtils::convertToString(int32_t)
./Collections/StringUtils.h:230: note: static std::string palo::StringUtils::convertToString(uint64_t)
./Collections/StringUtils.h:245: note: static std::string palo::StringUtils::convertToString(uint32_t)
make[1]: *** [Olap/Engine.lo] Error 1
make: *** [all-recursive] Error 1
My "fix" (please tell me if it not the right way):
// throw ErrorException(ErrorException::ERROR_OUT_OF_MEMORY, "tried to allocate " + StringUtils::convertToString((uint32_t)n * s) + " Bytes ");
throw ErrorException(ErrorException::ERROR_OUT_OF_MEMORY, "tried to allocate " + StringUtils::convertToString((uint32_t)uint32_t(n) * uint32_t(s)) + " Bytes ");
The other error appears to be due to a typo:
Worker/Worker.cpp: In member function ‘void palo::Worker::terminateProcess()’:
Worker/Worker.cpp:537: error: ‘stat’ was not declared in this scope
make[1]: *** [Worker/Worker.lo] Error 1
make: *** [all-recursive] Error 1
line 537: changed 'stat' to 'status'.
// if (!(WIFEXITED(childExitStatus) || WIFSIGNALED(stat))) {
if (!(WIFEXITED(childExitStatus) || WIFSIGNALED(status))) {
I launched the server using the start script and it responds to commands. I need to connect a gui and test it, but the build appears to be successful on my MacBook Air!
===
MBA:palo-server brianfrancis$ ./palo -V
Palo Server Version 3.1.1 (0000)
===
If anyone has trouble building Palo on the Mac, I will try to help you out.
Cheers,
Brian