Project

General

Profile

Actions

Support #2649

closed

Trying to get Wt working on OSX Mavericks

Added by Anonymous almost 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
02/10/2014
Due date:
% Done:

0%

Estimated time:

Description

Ive been trying for more than a week now to get some sort of Wt working on my Macbook Pro. My intention is to make a simple GUI interface that would run in any HTTP-browser that connects, the server being a Raspberry Pi running a Lighttpd server. I do, however, want to do my programming on my Macbook. So I followed the steps here: http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_Mac_OS_X_Lion

a few times. No success. At this point Im not even thinking cross compiling yet, just get Wt up and running in either Eclipse or Xcode. I got errors on all my includes for all libraries in the Hello.c example, until I just copied the Wt folder into the /usr/include folder. I know this is not the perfect solution, but if only it resulted in a successful compile.. Now I get an error saying the lwhttp library is nowhere to be found. Im not an expert when it comes to either Linux or Compilers, and much of my OSX knowledge is derived from messing around with the Pi since last summer, as OSX is built on the same base as Linux and many of the commands are the same.

Ive tried doing the http://redmine.emweb.be/projects/wt/wiki/Cross_compile_Wt_on_Raspberry_Pi, and Ive tried to install the JWt to get Wt working with Java in Eclipse. Neither has been successful. I get a few errors during my Wt install, but the guide tells me to expect some, so I am not sure wether they are relevant or not. I could use either C or Java as my base code language, Im most familiar with java, but we are doing a electronics engineering bachelor project, and everything else we are doing is mainly done in C. The web application I am responsible for is supposed to show some data from a Mysql database, and I really should get at least a sign of Wt working somewhere soon to prevent me from being forced to return to php (which I really don't know at all).

Any hints and help will be mostly appreciated.

Actions #1

Updated by Tor Arne Fallingen almost 11 years ago

And now I signed up and logged in, as not to appear so anonymous.

Actions #2

Updated by Wim Dumon almost 11 years ago

  • Status changed from New to Feedback
  • Assignee changed from Anonymous to Wim Dumon

Hi,

Don't copy your include files manually, run 'make install'. This will copy the header files, the libraries, and the resources to the installation directory. By default, this is /usr/local; this default path can be changed by setting the CMake variable CMAKE_INSTALL_PREFIX. We don't recommend to install in /usr, and I suggest you to remove the /usr/inlcude/Wt that you copied there as it may interfere with other wt installs.

Secondly, you will need to add an include search path and a library search path to your project. On OSX, that's command line option -I/usr/local/include and -L/usr/lib/include. This will resolve the problem that your linker can't find wt/wthttp/dbo/...

Personally, I usually install Wt in a totally different location (e.g. set CMAKE_INSTALL_PREFIX to /home/wim/wt-3.3.1-install and then add -I/home/wim/wt-3.3.1-install/include and -L/home/wim/wt-3.3.1-install/lib to my project) in order to be able to easily switch between Wt versions.

Both eclipse and xcode have GUI menus to set the include and library search path - you'll find them in their documentation.

BR,

Wim.

Actions #3

Updated by Tor Arne Fallingen almost 11 years ago

Thank you Wim. Im trying to understand the whole process a bit, I haven't really been trying to understand what really goes on underneath the desktop since I was a windows user, and even then its about a decade since I really was trying to do things in dos. So instead of jumping into the install again, running through all the steps and then asking questions if it failed, Id try and understand a bit more before starting that process. Making the installs in separate directories makes a lot of sense to me, as it does make it easier to clean up the file system in the future. The copy was just a desperate attempt to see if that would make the hello example work, and its deleted, alongside with all Wt-* and boost* directories made this far. So;

When I install Boost, do I want to do that in a "local" directory too, like this?

./b2 ---toolset=clan ---prefix=/Users/taf/Boost g cxxflags="-stdlib=libc -std=c++11" linkflags="-stdlib=libc" install

And then, when its installed, go to terminal and type:

export DYLD_LIBRARY_PATH=/Users/taf/Boost/lib:$DYLD_LIBRARY_PATH

Then for the Wt install:

$ cd wt-3*

$ mkdir build

$ cd build

$ cmake -DCMAKE_CXX_FLAGS='-stdlib=libc' \

-DCMAKE_INSTALL_PREFIX=/Users/taf/Wt-3.3.1 \

-DBOOST_PREFIX=/Users/taf/Boost \

-DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc' \

-DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc' \

-DWT_CPP_11_MODE='-std=c++11' ../

$ make

$ make -C examples # to build the examples

And then I need to find the right place in Xcode, Eclipse or QTCreator to link to the library directory of Wt, because that wont be added to any startup files that tells the system where to find files for general system purposes?

In fear of appearing like a moron, Ill rather try to make sure I do it the right way the first time, than assuming a few things that Im not completely certain on. I will search again for the include menu of Xcode (which is the one I have been searching the most for this feature in).

Actions #4

Updated by Wim Dumon almost 11 years ago

It's not easy to find in xcode, I made a small project recently and remember spending quite some time trying to find the location of the option, then search on google, then try to find it again, and finally found the option, while wondering why XCode hides these important project settings so well.

Probably this helps:

http://stackoverflow.com/questions/14134064/how-to-set-include-path-in-xcode-project

But I don't like the accepted answer (Setting -I explicitly). The option should be explicitly named like in this screen shot:

http://i.imgur.com/Tcs36ec.png

BR,

Wim.

Actions #5

Updated by Tor Arne Fallingen almost 11 years ago

I do agree on both, I did find where to include paths in Xcode, so Ill try that when Ive installed everything again.

Did you look at the install commands in my previous post? I just wonder if this seems like the correct way of executing the installs. Sometimes I wish I had a laptop with Ubuntu or similar when Im trying to find ways to do things by the glorious path of google :) It seems like there are a lot more resources for that, and Mac OSX is "Unix like" but not always similar, so its a game of hit and miss. But Im aiming to understand a bit more of how installs, make, cmake and configurations work on this system.

Actions #6

Updated by Wim Dumon almost 11 years ago

At glance, your commands look ok. Don't forget to do a 'make install' in the wt build directory to copy the files to the install prefix location.

BR,

Wim.

Actions #7

Updated by Tor Arne Fallingen almost 11 years ago

Allright Wim, Im getting closer by the minute :) Now Ive added the Wt and Boost directories to the search paths in Xcode, and Xcode finds the Wt library. However, my build fail on the following:

#include <boost/any.hpp> ---> "boost/any.hpp" file not found.

Which is strange, as Ive also included the path of my boost install where I added my Wt directories... Any idea what this could be? I do see that I have a file named any.hpp in the directory its pointing at too.

Actions #8

Updated by Wim Dumon almost 11 years ago

You may need to fine-tune the boost include search path. It's not just /Users/taf/Boost/include, but probably /Users/taf/Boost/boost-1_55 or similar.

What does find /Users/taf/Boost -name any.hpp report?

Wim.

Actions #9

Updated by Tor Arne Fallingen almost 11 years ago

I tried /Users/taf/Boost -name any.hpp in terminal, and nothing happened. But for some reason, nothing is installed in /Users/taf/Boost. However, I changed it up a bit, and this is what I get:

Tors-MacBook-Retina:build taf$ find /Users/taf/boost_1_55_0 -name any.hpp

/Users/taf/boost_1_55_0/boost/any.hpp

/Users/taf/boost_1_55_0/boost/fusion/algorithm/query/any.hpp

/Users/taf/boost_1_55_0/boost/fusion/algorithm/query/detail/any.hpp

/Users/taf/boost_1_55_0/boost/fusion/include/any.hpp

/Users/taf/boost_1_55_0/boost/proto/detail/any.hpp

/Users/taf/boost_1_55_0/boost/spirit/home/support/algorithm/any.hpp

/Users/taf/boost_1_55_0/boost/type_erasure/any.hpp

/Users/taf/boost_1_55_0/boost/xpressive/detail/utility/any.hpp

The path I included in Xcode is:

/Users/taf/boost_1_55_0

and I added that to "Framework search path", "Header search path" and "Library search path" .... Correction, it was not added to "Header search path", and I did, so now that error seems to have been replaced with a fail on "Wt/WConfig.h" - file not found.

So I did a search more:

Tors-MacBook-Retina:build taf$ find /Users/taf/wt-3.3.1/src/Wconfig.h

find: /Users/taf/wt-3.3.1/src/Wconfig.h: No such file or directory

Tors-MacBook-Retina:build taf$ find /Users/taf/wt-3.3.1/Wconfig.h

find: /Users/taf/wt-3.3.1/Wconfig.h: No such file or directory

Then I didn't want to bother you before Ive tried a search in finder, and finder reported back that WConfig.h is situated in /Users/taf/wt-3.3.1/build, so I added that directory too, but still its failing, saying the file can't be found. I even tried restarting Xcode, but nothing changed.

Actions #10

Updated by Wim Dumon almost 11 years ago

did you run 'make install' on the Wt directory? Did that succeed? The install step of Wt copies the configuration file in the same destination directory as the other header files.

Likewise, it looks like the boost install step did not work for you. Did bjam .... install execute successfully?

Wim.

Actions #11

Updated by Tor Arne Fallingen almost 11 years ago

Ok, now Im going through my history in Terminal, and Im copying and pasting the information around the make/installs, of course I can't post the whole thing, as its quite a lot, but Im trying an educated guess on whats important. At the same time Ill get to double check what Ive done.

First:

Tors-MacBook-Retina:boost_1_55_0 taf$ ./bootstrap.sh

-n Building Boost.Build engine with toolset darwin...

Tors-MacBook-Retina:boost_1_55_0 taf$ ./b2 ---toolset=clang ---prefix=/Users/taf/Boost g cxxflags="-stdlib=libc -std=c++11" linkflags="-stdlib=libc" install

link.jam: No such file or directory

notice: could not find main target g

notice: assuming it is a name of file to create.

Performing configuration checks

- 32-bit : no

  • 64-bit : yes.....

Then:

Tors-MacBook-Retina:boost_1_55_0 taf$ export DYLD_LIBRARY_PATH=/Users/taf/Boost/lib:$DYLD_LIBRARY_PATH

At last here comes Wt:

Tors-MacBook-Retina:build taf$ cmake -DCMAKE_CXX_FLAGS='-stdlib=libc' \ -DCMAKE_INSTALL_PREFIX=/Users/taf/Wt-3.3.1 \ -DBOOST_PREFIX=/Users/taf/Boost \ -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc' \ -DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc' \ -DWT_CPP_11_MODE='-std=c++11' ../

--- The C compiler identification is Clang 5.0.0

--- The CXX compiler identification is Clang 5.0.0....

Tors-MacBook-Retina:build taf$ make

[ 1%] Generating JQuery_js.C

[ 1%] Generating Plain_html.C...

Tors-MacBook-Retina:build taf$ make install

[ 81%] Built target wt

[ 81%] Built target wttest...

I see that Ive done all this in the "build" directory, should I have cd ..´ed to wt-3.3.1 before doing make and make install?

Actions #12

Updated by Tor Arne Fallingen almost 11 years ago

I copied and pasted my terminal window from the start of my install to the present into a document and saved it on dropbox, just in case... I am aware that Im receiving good and free help, and Im eternally grateful.

https://www.dropbox.com/sh/ewcc70yb542e90e/OygT9I-o1w

Actions #13

Updated by Wim Dumon almost 11 years ago

Your b2 command should end on 'install'.

Does the output of 'make install' in wt's build directory end with a whole list of files being copied to the install directory?

BR,

Wim.

Actions #14

Updated by Tor Arne Fallingen almost 11 years ago

My ./b2 command ends with "install".

Looking at the Terminal history on what happens after typing "make install", it looks like a lot of invoking in code almost similar to C, then it ends up in:

"ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)"

So it definitively seems like something went wrong in the Wt install. Either my chain of CMAKE commands are causing some kind of error, or there is something else going wrong like me being in the "build" directory when i "make" and "make install". This is a bit beyond me, as Im really new to MAKEFILE and Im still trying to understand everything that goes in there.

Actions #15

Updated by Tor Arne Fallingen almost 11 years ago

Now Ive had correspondence with another guy that had problems, but managed to get Wt working. One of the issues he seemed to remember having was the lack of "sudo" in the commands of the guide. Could this be the cause of a lot of my problems? Id normally use "sudo" when installing, to get permissions for my installs, but as the guide didn't mention it, I figured Id try and follow the guide to the letter where nothing different has been confirmed.

Actions #16

Updated by Koen Deforche almost 11 years ago

Hey,

If you fail to preprend sudo you should get errors that indicate permission problems. But reviewing the wiki page, I can't see where it would be missing?

Regards,

koen

Actions #17

Updated by Tor Arne Fallingen almost 11 years ago

Hey Koen,

I do agree that I fail to see a lot of "Permission denied" messages, but could the "clang: error: linker command failed with exit code 1 (use -v to see invocation)" message be a result of linker command not being permitted? I don't know if you looked at the history I pasted to a document and enclosed the link to? Im really hoping that I will be able to get Wt working by the end of tomorrow, but as I had started a support case with Wim, I put any desperate try and error fiddling on halt and wait for a reply from him or anyone else on the support staff (like you), before trying anything else. I also edited the install and cmake commands and ran them by Wim before executing them, thinking I should try and not add anything to this install other than what was okayed by the Wt support personnel :) Everything I have done should be stated in this thread. This suggestion of using sudo was received om mail this morning, from someone that got support from you like a year back almost, and I have been fiddling with php as a plan B, while waiting for support to get back to me :)

Actions #18

Updated by Koen Deforche almost 11 years ago

Hey,

Ah, I didn't notice the link.

This:

./b2 ---toolset=clan ---prefix=...

should be:

./b2 ---toolset=clang ---prefix=...

You need to pay attention to the error messages (ERROR: ...), there's no point in continuing the process when encountering fatal errors like these.

Regards,

koen

Actions #19

Updated by Tor Arne Fallingen almost 11 years ago

Yes, I noticed and changed it to clang before it succeeded. I know the document with my pasted history from my Terminal window is difficult reading through, but I used cmd+f and just search for what I need to find to verify what happened. I do know I posted it as clan here, but I caught it while trying to install. In that document, you can see what happened when it ran, and also what messages I got, both for ./b2, cmake, make and make install...

Actions #20

Updated by Wim Dumon almost 11 years ago

Hi Tor,

So what is the error now then?

BR,

Wim.

Actions #21

Updated by Tor Arne Fallingen almost 11 years ago

Im sorry to be such a pain Wim :)

I kind of left it at post #14, and haven't done anything more after that. As you suspected, there doesn't seem to be any files put into any directories during make install. I did get the mail about "sudo" from another Wt user, but I have left that one be too, waiting for you to get back to me on my #14. As it seemed we were into a dialogue towards solving this issue. I didn't want to do anything outside what you suggested during this troubleshoot, as I know how annoying it can be if a fault is caused by something done but not mentioned by the client.

Actions #22

Updated by Tor Arne Fallingen almost 11 years ago

So... any further suggestions? Should I try and redo the install using sudo? I know koen had doubts about its effect, but I am running out of ideas.

Actions #23

Updated by Wim Dumon almost 11 years ago

The previous error report does not contain sensible information because of the clan vs clang mixup. It simply reports that error.

sudo is not strictly required to install Wt, but you may need to take some extra steps to avoid that configuration files are installed in /etc.

Wim.

Actions #24

Updated by Tor Arne Fallingen almost 11 years ago

I understand. The clan vs clang mixup was caught when it happened, and this is how it ended up transpiring:

Tors-MacBook-Retina:boost_1_55_0 taf$ ./b2 ---toolset=clang ---prefix=/Users/taf/Boost g cxxflags="-stdlib=libc -std=c++11" linkflags="-stdlib=libc" install

link.jam: No such file or directory

notice: could not find main target g

notice: assuming it is a name of file to create.

Performing configuration checks

- 32-bit : no

  • 64-bit : yes
  • arm : no
  • mips1 : no
  • power : no
  • sparc : no
  • x86 : yes
  • has_icu builds : no
    warning: Graph library does not contain MPI-based parallel components.
    note: to enable them, add "using mpi ;" to your user-config.jam
  • zlib : yes
  • iconv (libc) : no
  • iconv (separate) : yes
  • icu : no
  • icu (lib64) : no
  • compiler-supports-ssse3 : yes
  • lockfree boost::atomic_flag : yes
  • compiler-supports-avx2 : yes
  • gcc visibility : yes
  • long double support : yes
    warning: skipping optional Message Passing Interface (MPI) library.
    note: to enable MPI support, add "using mpi ;" to user-config.jam.
    note: to suppress this message, pass "---without-mpi" to bjam.
    note: otherwise, you can safely ignore this message.
  • zlib : yes
    don't know how to make g
    ...found 1 target...
    ...can't find 1 target...

The first time, with the clan typo, it had a lot more errors. Its still possible that my ./b2 line of commands are wrong, but Im not one to see that at this level. Also, this non typo ./b2 line of commands doesn't seem to result in much of anything, but Im not qualified to do much more than make a guess on this. And Im not sure if I know how to avoid configuration files to be installed in /etc, I just assume this might be the result of installing using sudo. Im really still hoping to end up getting Wt to work, and unfortunately, Ill be bothering you guys at support for as long as you care to answer me, hoping that Im not too bothersome. Wt will be a vital part of our bachelor project, if I can make it work, as it seems like the perfect way of coding a website to be accessed with any available device at the site, be it a redundant laptop or an iPad, or whatever.

Actions #25

Updated by Koen Deforche almost 11 years ago

Hey,

You are doing:

./b2 --toolset=clang --prefix=/Users/taf/Boost g cxxflags="-stdlib=libc++ -std=c++11" linkflags="-stdlib=libc++" install

and getting errors like:

notice: could not find main target g
notice: assuming it is a name of file to create.
...
don't know how to make g
...found 1 target...
...can't find 1 target...

The command on the wiki says it should be:

sudo ./b2 --toolset=clang cxxflags="-stdlib=libc++ -std=c++11" linkflags="-stdlib=libc++" install

It should be obvious from the error messages that there's something wrong with your command line. The error messages serve a purpose; please read them.

Regards,

koen

Actions #26

Updated by Tor Arne Fallingen almost 11 years ago

Thank you, Im a moron, I see now where the "g" from "clang" disappeared to the first time. Ill give it another go tonight. I did read the error messages several times, and look over the log several times, but you know how it is sometimes... you get blinded by looking at the same things too long. If this works I really owe you guys a beer ;)

Actions #27

Updated by Tor Arne Fallingen almost 11 years ago

Wim, now I edited the idiotic mistake in my ./b2 command chain. It seems to work, but in #13 you state that this should result in a lot of files being copied to the install directory. I guess /Users/taf/Boost/include/boost..... is correct. It also copies files to bin.V2 and Cellar. Then Im uncertain about the "make" and "make install" commands, they produce errors, and they don't seem to do much of anything. That is... Make does build a lot of CXX objects, but make install seem to return quite a few errors, and I have a feeling it do not complete any install:

Tors-MacBook-Retina:build taf$ make install

[ 81%] Built target wt

[ 81%] Built target wttest

[ 89%] Built target test

[ 93%] Built target wtdbo

[ 93%] Built target wtdbosqlite3

[ 95%] Built target test.sqlite3

Linking CXX shared library libwthttp.dylib

Undefined symbols for architecture x86_64:

"boost::program_options::to_internal(std::_1::basic_string<char, std::1::char_traits, std::1::allocator > const&)", referenced from:

std::_*1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > boost::program_options::to_internal<std::1::basic_string<char, std::1::char_traits, std::1::allocator > >(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::
_1::allocator > > > const&) in Configuration.o

"boost::program_options::basic_parsed_options boost::program_options::parse_config_file(std::1::basic_istream<char, std::1::char_traits >&, boost::program_options::options_description const&, bool)", referenced from:

http::server::Configuration::setOptions(int, char, std::_1::basic_string<char, std::1::char_traits, std::_1::allocator > const&) in Configuration.o

"boost::program_options::options_description::options_description(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, unsigned int, unsigned int)", referenced from:

http::server::Configuration::createOptions(boost::program_options::options_description&) in Configuration.o

http::server::Configuration::setOptions(int, char, std::_1::basic_string<char, std::1::char_traits, std::_1::allocator > const&) in Configuration.o

"boost::program_options::invalid_option_value::invalid_option_value(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&)", referenced from:

void boost::program_options::validate<long long, char>(boost::any&, std::_1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::_1::allocator > > > const&, long long*, long) in Configuration.o

void boost::program_options::validate<int, char>(boost::any&, std::_1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::_1::allocator > > > const&, int*, long) in Configuration.o

"boost::program_options::error_with_option_name::error_with_option_name(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, int)", referenced from:

std::_1::basic_string<char, std::1::char_traits, std::1::allocator > const& boost::program_options::validators::get_single_string(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::_1::allocator > > > const&, bool) in Configuration.o

"boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::1::pair<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&>)", referenced from:

boost::program_options::basic_command_line_parser::extra_parser(boost::function1<std::_1::pair<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::basic_string<char, std::1::char_traits, std::_1::allocator > const&>) in Configuration.o

"boost::program_options::detail::cmdline::cmdline(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&)", referenced from:

boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const* const*) in Configuration.o

"boost::program_options::validate(boost::any&, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, std::1::basic_string<char, std::1::char_traits, std::1::allocator >*, int)", referenced from:

boost::program_options::typed_value<std::_1::basic_string<char, std::1::char_traits, std::1::allocator >, char>::xparse(boost::any&, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::_1::allocator > > > const&) const in Configuration.o

"boost::program_options::operator<<(std::1::basic_ostream<char, std::1::char_traits >&, boost::program_options::options_description const&)", referenced from:

http::server::Configuration::setOptions(int, char, std::_1::basic_string<char, std::1::char_traits, std::_1::allocator > const&) in Configuration.o

"boost::program_options::abstract_variables_map::operator[](std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) const", referenced from:

http::server::Configuration::readOptions(boost::program_options::variables_map const&) in Configuration.o

http::server::Configuration::checkPath(boost::program_options::variables_map const&, std::_1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::_1::allocator >&, int) in Configuration.o

"boost::program_options::error_with_option_name::substitute_placeholders(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) const", referenced from:

vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::program_options::invalid_option_value > in Configuration.o

vtable for boost::exception_detail::error_info_injectorboost::program_options::invalid_option_value in Configuration.o

vtable for boost::program_options::invalid_option_value in Configuration.o

vtable for boost::program_options::validation_error in Configuration.o

vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::program_options::validation_error > in Configuration.o

vtable for boost::exception_detail::error_info_injectorboost::program_options::validation_error in Configuration.o

"boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::_1::allocator > > > const&, bool) const", referenced from:

vtable for boost::program_options::typed_value<long long, char> in Configuration.o

vtable for boost::program_options::typed_value<std::_*1::basic_string<char, std::1::char_traits, std::
_1::allocator >, char> in Configuration.o

vtable for boost::program_options::typed_value<int, char> in Configuration.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: * [src/http/libwthttp.3.3.1.dylib] Error 1

make[1]: * [src/http/CMakeFiles/wthttp.dir/all] Error 2

make: * [all] Error 2

Tors-MacBook-Retina:build taf$

Am I correct in assuming this is a faulty install?

Actions #28

Updated by Wim Dumon almost 11 years ago

Hello Tor,

b2 copies the files itself (if you run it with 'install' at the end), you don't have to copy anything manually. Just check that they are there.

After b2 install finishes successfully, remove your wt build directory completely, rerun cmake with the right options, and then run make.

What you see now is a build error (a linker error), not an installation error. If the error persists after cleaning your build directory and restarting, can you run 'make VERBOSE=1' and paste the link command as well as the output of the link command? What version of Wt are you building?

BR,

Wim.

Actions #29

Updated by Tor Arne Fallingen almost 11 years ago

Ok, so then I assume that b2 has done the correct install. Then I have to ask you if you could please look at my cmake, to verify it: cmake -DCMAKE_CXX_FLAGS='-stdlib=libc' \ -DCMAKE_INSTALL_PREFIX=/Users/taf/Wt-3.3.1 \ -DBOOST_PREFIX=/Users/taf/Boost \ -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc' \ -DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc' \ -DWT_CPP_11_MODE='-std=c++11' ../ (This is exactly how i have made it, and I copy and paste it into Terminal, so please tell me if I have messed it up)

You say to remove the wt build directory after installing b2, but in the instructions on your wiki it says to make this directory after completing the Boost install instructions... Anyway, as soon as you have looked at my cmake and verified or corrected it, I will proceed with your instructions. By cleaning the build directory and restarting, do you mean just redoing the installation steps, or actually rebooting my macbook? Im not sure if there is some instructions persistent in my RAM from my failing install attempts :)

Actions #30

Updated by Wim Dumon almost 11 years ago

that cmake command looks right. But you know that a \ is used in bash to concatenate multi-line commands, so you don't have to type backslashes if you type the command in one line, right?

restart the building process by removing your build directory and then start from 'mkdir build'

Wim

Actions #31

Updated by Tor Arne Fallingen almost 11 years ago

OK, thank you. I was not sure about the \ in this case, being that Im not so used to doing multi commands in Terminal. But Im learning. I have to admit that Ive hardly done much in something similar (dos) the past 10 years, and this last year Ive started using Linux at the University college, and then Ive learned and started understanding both Linux and OSX a lot better. So please excuse my ignorance and bear with me. I will try again now.

Actions #32

Updated by Tor Arne Fallingen almost 11 years ago

Wim, I forgot to say that Im trying to install Wt-3.3.1

Now Ive run the cmake -DCMAKE_CXX_FLAGS='-stdlib=libc' -DCMAKE_INSTALL_PREFIX=/Users/taf/Wt-3.3.1 -DBOOST_PREFIX=/Users/taf/Boost -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc' -DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc' -DWT_CPP_11_MODE='-std=c++11' ../

and make. I end up getting a message at the end of the make install process:

CMake Error at cmake_install.cmake:63 (FILE):

file cannot create directory: /etc/wt. Maybe need administrative

privileges.

make: * [install] Error 1

Tors-MacBook-Retina:build taf$

I can see that its trying to install into a system (root) directory, so it kind of makes sense that it needs sudo rights, but you recommended installing in a different directory under my user. How do I do that? I assume I would have to erase build and redo the cake then... Else, should I sudo the make install?

Actions #33

Updated by Wim Dumon almost 11 years ago

The installation process tries to copy some configuration files to /etc, which you can't do as a normal user.

You have two options:

- run sudo make install

  • edit build/CMakeCache.txt, find the reference to /etc/wt (CONFIGDIR, CONFIGURATION, WTHTTP_CONFIGURATION) and modify it to a location where you can write (/Users/taf/Wt-3.3.1/etc), and rerun make install

Note: I noticed your install dir is set to /Users/taf/Wt-3.3.1, but you're not installing to your wt source directory I hope?

Actions #34

Updated by Tor Arne Fallingen almost 11 years ago

Im a bit embarrased to say that this is exactly what Ive been doing, because I was uncertain about wether I could define a new location or not at first, and then I ended up not reflecting much ore on it. But of course now Id like to change that. Would it not be possible to just edit my cmake to different location, and run it again after deleting the build directory?

By this point I think I have started to grasp a whole lot more on the install process, and I might try and make a guide for OSX Mavericks install.

Actions #35

Updated by Wim Dumon almost 11 years ago

No. Remove the Wt source directory, the build directory, and start over with a fresh Wt copy.

What points in the instructions for Lion don't apply for Mavericks?

Wim.

Actions #36

Updated by Tor Arne Fallingen almost 11 years ago

I think you are right, there isn't so much that it don't apply for Mavericks, as I was thinking more in the line of writing an "installation guide for dummies like myself" and try and explain the additional steps I ended up making, like adding a custom install path (which I moronically almost failed), how I edited build/CMakeCache.txt to redirect all references to /etc/wt into a directory under my home directory. I do hope you're not too annoyed by me at this point. Ive just returned home and started doing the remainder of the install now.

Actions #37

Updated by Tor Arne Fallingen almost 11 years ago

Im happy to say that I had my first Hello World application built in Qt and running on my MacBook with Mavericks installed. Looking back at the long and thorny road to accomplish this Id say that I have a couple of comments to the guide for Lion, and it might be comments more suited for noobs than anyone thats been playing around a while in the world of coding. I will have to write something for our project report about how I installed Wt, and I think for a noob pointing out the difference between using sudo and a customized prefix is good, I ended up not using sudo. And also mentioning something more around DYLD_LIBRARY_PATH would probably be good for a noob, because just running export didn't do me much good. But there are indications that this changed from the previous OS to Mavericks according to a message board post or two I read. I have to thank you for your patience and good help so far.

Actions #38

Updated by Koen Deforche over 9 years ago

  • Status changed from Feedback to Resolved
Actions #39

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF