Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to boost-1.55 #993

Merged
merged 2 commits into from
Mar 27, 2014
Merged

Conversation

timblechmann
Copy link
Contributor

No description provided.

@danstowell
Copy link
Member

Hi tim - thanks for this. Build fails for me on ubuntu 13.04. I don't understand the "new_allocator"-related error, though I can't see any specific compiler requirements in the boost 1.55 docs, so do you know if this is a bug or an expected issue?

Excerpt from failed build: http://pastie.org/8473057

% gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

(I used ccache too)

EDIT: Aha, boost requirments here say this compiler should indeed be supported.

@bagong
Copy link
Contributor

bagong commented Nov 29, 2013

I get this error on OSX:

[ 43%] Building CXX object lang/CMakeFiles/libsclang.dir/LangSource/SC_TerminalClient.cpp.o
In file included from /Users/rainer/GitRepos/supercollider/lang/LangSource/SC_TerminalClient.cpp:27:
/Users/rainer/GitRepos/supercollider/lang/LangSource/SC_TerminalClient.h:37:10: fatal error: 'boost/asio/system_timer.hpp' file not found
#include <boost/asio/system_timer.hpp>
^
1 error generated.
make[2]: *** [lang/CMakeFiles/libsclang.dir/LangSource/SC_TerminalClient.cpp.o] Error 1
make[1]: *** [lang/CMakeFiles/libsclang.dir/all] Error 2
make: *** [all] Error 2

@danstowell
Copy link
Member

Thanks tim for the fixes. I get successful build now.

I don't get @bagong 's error - but that's probably because I'm on linux where system_timer.hpp is in my system path. There are a few files that this PR drops so there may potentially be others to add in.

@bagong
Copy link
Contributor

bagong commented Nov 30, 2013

If I copy system_timer.hpp into the respective folder, it builds successfully...

@telephon
Copy link
Member

Should we merge this?

@danstowell
Copy link
Member

Does it work as-is on mac? The messages from @bagong suggest that at least one change is needed.

The update would be good in general - I don't know if Tim had any specific motivations but it seems there are some improvements in the "atomic" stuff, plus some "asio" stuff that may help windows devs. So if build is fine then yes let's go...

@telephon
Copy link
Member

I haven't tested it yet, but it might be a good idea to update everything we can in terms of external libraries in a short period – we can then get up to date and not worry for a while then. So QT5 seems to be working, maybe there are other things?

@danstowell
Copy link
Member

Julian - thanks for doing a lot of tidying up recently, by the way!

For this particular PR, I think it could well be confusing if we merge it before checking that mac people can build it. Could a Mac user please check it out and check it?

If there is any problem with system_timer.hpp then I think it can be removed as follows:

diff --git a/lang/LangSource/SC_TerminalClient.h b/lang/LangSource/SC_TerminalClient.h
index 5de4bdd..aafb9e8 100644
--- a/lang/LangSource/SC_TerminalClient.h
+++ b/lang/LangSource/SC_TerminalClient.h
@@ -34,7 +34,6 @@

 #include <boost/array.hpp>
 #include <boost/asio.hpp>
-#include <boost/asio/system_timer.hpp>

I believe that the things we use are already dragged in by asio.hpp - but someone may be able to correct me on this.

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

I have built successfully in the past with boost 1.5.5, but now I get an error in a very early build stage. Maybe has to do with the latest Mac toolchain? I also get an error with supernova others don't have. However, this is my error:

[  1%] Building CXX object external_libraries/CMakeFiles/boost_thread.dir/boost/libs/thread/src/pthread/once.cpp.o
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/libs/thread/src/pthread/once.cpp:8:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/libs/thread/src/pthread/./once_atomic.cpp:9:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/thread/once.hpp:20:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/thread/pthread/once_atomic.hpp:20:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic.hpp:12:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/atomic.hpp:17:
In file included from /Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/platform.hpp:22:
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:961:64: error:
      no matching constructor for initialization of 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
                                                               ^  ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type' for 1st
      argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit default constructor) not viable:
      requires 0 arguments, but 1 was provided
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:968:22: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type tmp = 0;
                     ^     ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:983:22: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type tmp = 0;
                     ^     ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:997:22: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                     ^            ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:997:38: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                                     ^           ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:1013:22: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                     ^            ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:1013:38: error:
      no viable conversion from 'int' to 'storage_type' (aka
      'boost::atomics::detail::storage128_type')
        storage_type expected_s = 0, desired_s = 0;
                                     ^           ~
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit copy constructor) not viable: no known
      conversion from 'int' to 'const boost::atomics::detail::storage128_type &'
      for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
/Users/rainer/Projects/supercollider/source/external_libraries/boost/boost/atomic/detail/gcc-atomic.hpp:932:28: note:
      candidate constructor (the implicit move constructor) not viable: no known
      conversion from 'int' to 'boost::atomics::detail::storage128_type &&' for
      1st argument
struct BOOST_ALIGNMENT(16) storage128_type
                           ^
7 errors generated.
make[2]: *** [external_libraries/CMakeFiles/boost_thread.dir/boost/libs/thread/src/pthread/once.cpp.o] Error 1
make[1]: *** [external_libraries/CMakeFiles/boost_thread.dir/all] Error 2
make: *** [all] Error 2

@timblechmann
Copy link
Contributor Author

related to apple's latest compiler. use apple's clang-5.0 instead of 5.1 or wait for boost-1.56.

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

Homebrew provides a version 1.55.0_1, which seems to be patched for that particular problem. The build goes through with it. Is it an option too to use that, or are there customizations in SC's bundled boost?
@tim: I get a new supernova build-error related to a path-statement in OSC-pack when using that system boost version. Are you interested in the report?

@timblechmann
Copy link
Contributor Author

there are some additions to boost.lockfree, that did not make it into that boost release

@telephon
Copy link
Member

Compiles fine on OSX 10.8 here, too.

@telephon
Copy link
Member

… ups, not sure: I was referring to c7600cc

@danstowell
Copy link
Member

@telephon you can test this branch by doing

git checkout -b timblechmann-topic/boost_1_55 master
git pull git@github.com:timblechmann/supercollider.git topic/boost_1_55

and then build etc

@telephon
Copy link
Member

@danstowell this is useful and non-trivial information.
To compile, I had to remove system_timer.hpp in SC_TerminalClient.h, but then eveything ran smoothly.
Instead of removing it, we could also add that boost file ?

@danstowell
Copy link
Member

@telephon thanks. I just copied-and-pasted it from this github page ;) but it probably wasn't obvious if you're looking at it via the emails.

No I don't think we should add in the file, because that means altering the boost library and making it different from the "upstream". I'll merge, make the change, and hope that this is the correct way to deal with that issue!

danstowell added a commit that referenced this pull request Mar 27, 2014
@danstowell danstowell merged commit a252666 into supercollider:master Mar 27, 2014
@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

On 27 Mar 2014, at 18:24, danstowell notifications@github.com wrote:

Merged #993.


Reply to this email directly or view it on GitHub.

Hmm. I don’t quite understand: so now somebody with latest OSX toolchain can’t build master. I also don’t quite get why system_timer.hpp shouldn’t be added (or the include removed if the file is not actually required). Which “upstream” do you refer to? system_timer.hpp is in standard boost 1.55
Best
.r.

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

I overlooked you removal of the include, but still...

@timblechmann
Copy link
Contributor Author

including the main asio header should be enough. if the file was removed from boost-1.55 it would explain, why it wasn't picked up by bcp and left out of the extraction process.
it might be worth to cherry-pick the boost.atomic related fixes for apple-clang-5.1 AKA clang-3.4.

@telephon
Copy link
Member

Hmm. I don’t quite understand: so now somebody with latest OSX toolchain can’t build master.

@bagong why should that be?

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

Well, the error I posted above occurres with with the latest toolchain. I mean of course there are workarounds... I am not protesting, just wondering...

@telephon
Copy link
Member

Maybe related?
Homebrew/legacy-homebrew#27396

jonathantopf commented 11 days ago:

I found that doing brew update then brew reinstall boost fixed it

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

Well, as far as I understand the idea is to use bundled boost. As Tim said there are some differences. And a side problem is that the supernova compile get's an error if you use a boost from the system. Maybe some paths can only be resolved relative to the sc-repo.

@bagong
Copy link
Contributor

bagong commented Mar 27, 2014

Looks more like an issue how to organize version control and workflow ;) Scott Carver is already suggestion a solution on the sc-dev list. It seems to be a well known issue (and yes, probably the one you're referring to. that must be how 1.55.0_1 came about, with which I built successfully, except for supernova...)...

@danstowell
Copy link
Member

@bagong sorry, I think I thought that tim's apple patch fixed your issue. Will continue discussion on the list

@bagong
Copy link
Contributor

bagong commented Mar 28, 2014

@danstowell Yes, I sort of gathered that... Sorry for sloppy language, it's not easy to be clear sometimes.

@timblechmann timblechmann deleted the topic/boost_1_55 branch November 23, 2014 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants