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

external libraries: update to boost-1.56 #1165

Closed

Conversation

timblechmann
Copy link
Contributor

No description provided.

@timblechmann
Copy link
Contributor Author

superseded by #1166

@sonoro1234
Copy link
Contributor

Hi Tim,

Trying to build from github master 3.7

CMake Error at external_libraries/CMakeLists.txt:47
(target_add_definitions):
Unknown CMake command "target_add_definitions".

Just in case I made the substitution :

#target_add_definitions( boost_thread PRIVATE BOOST_THREAD_BUILD_LIB)
add_definitions(-DBOOST_THREAD_BUILD_LIB)

But then in building:

[ 33%] Building CXX object
server/scsynth/CMakeFiles/libscsynth.dir/SC_ComPort.cpp.obj
In file included from
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/semaphore.
hpp:139:0,
from
C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_HiddenWorld.h:35,
from
C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_ComPort.cpp:22:
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/semaphore/semaphore_windo
ws.hpp:18:51: fatal error: boost/detail/winapi/synchronization.hpp: No
such file or directory
#include <boost/detail/winapi/synchronization.hpp>
^
compilation terminated.

So I copied from boost 1.56 distribution some missing files and then:

[ 15%] Building CXX object
server/scsynth/CMakeFiles/libscsynth.dir/SC_ComPort.cpp.obj
In file included from
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/sem
aphore/semaphore_windows.hpp:21:0,
from
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/semaphore.
hpp:139,
from
C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_HiddenWorld.h:35,
from
C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_ComPort.cpp:22:
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/semaphore/semaphore_windo
ws.hpp: In member function 'bool
boost::sync::winnt5::semaphore::priv_timed_wait(const
boost::sync::detail::system_time_point
&)':
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/semaphore/semaphore_windo
ws.hpp:171:41: error: 'lock_error' was not declared in this scope
BOOST_SYNC_DETAIL_THROW(lock_error,
(err)("semaphore::timed_wait failed in WaitForMultipleObjects"));
^

@timblechmann
Copy link
Contributor Author

first, could you test:

diff --git a/include/boost/sync/detail/semaphore/semaphore_windows.hpp b/include/boost/sync/detail/semaphore/semaphore_windows.hpp
index fdf6866..b778844 100644
--- a/include/boost/sync/detail/semaphore/semaphore_windows.hpp
+++ b/include/boost/sync/detail/semaphore/semaphore_windows.hpp
@@ -19,6 +19,7 @@
 #include <boost/detail/winapi/handles.hpp>
 #include <boost/sync/detail/config.hpp>
 #include <boost/sync/detail/throw_exception.hpp>
+#include <boost/sync/exceptions/lock_error.hpp>
 #include <boost/sync/exceptions/resource_error.hpp>
 #include <boost/sync/exceptions/overflow_error.hpp>
 #include <boost/sync/exceptions/wait_error.hpp>

second:
update cmake

third:
seems that the bcp script missed some of the winapi headers. adding them from the 1.56 tarball is the way to go. maybe sc should simply include all of boost ... makes it harder to miss things

@sonoro1234
Copy link
Contributor

In file included from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/wai
table_timer.hpp:25:0,
from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/detail/sem
aphore/semaphore_windows.hpp:28,
from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost_sync/include/boost/sync/semaphore.
hpp:139,
from C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_HiddenWorld.h:35,
from C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_ComPort.cpp:22:
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/detail/winapi/dll.hpp:66:9: warning: conflicts wit
h previous declaration 'void* boost::detail::winapi::GetModuleHandleA(boost::detail::winapi::LPCSTR_)' [enabled by default]
GetModuleHandleA(
^
In file included from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/errors.hpp:37:0
,
from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/detail/os_file_
functions.hpp:16,
from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/detail/managed_
memory_impl.hpp:23,
from C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/managed_shared_
memory.hpp:21,
from C:\SupercolliderRepos\master4\supercollider\server\scsynth../../common/server_shm.hpp:29,
from C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_HiddenWorld.h:37,
from C:\SupercolliderRepos\master4\supercollider\server\scsynth\SC_ComPort.cpp:22:
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/detail/win32_api.hpp: In instantiatio
n of 'static void* boost::interprocess::winapi::function_address_holder::get(unsigned int) [with int Dummy = 0]':
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/detail/win32_api.hpp:1614:20: requi
red from here
C:/SupercolliderRepos/master4/supercollider/external_libraries/boost/boost/interprocess/detail/win32_api.hpp:1541:31: error:
invalid conversion from 'boost::interprocess::winapi::farproc_t {aka int (attribute((stdcall)) )()}' to 'void' [-fp
ermissive]

@sonoro1234
Copy link
Contributor

target_add_definitions is not recognized even by cmake 3.0

@timblechmann
Copy link
Contributor Author

ah, the win32 code path ... compare #1189.
for the other issue, a google search showed: https://svn.boost.org/trac/boost/ticket/10325

@timblechmann
Copy link
Contributor Author

and #1191. someone will have to pull it, i can't. for the windows/interprocess stuff, i can't help, though.

@sonoro1234
Copy link
Contributor

It seems they can't be pulled because some kind of of Travis error?

@timblechmann
Copy link
Contributor Author

the travis ci should either be fixed or removed from github. if it is unmaintained, it should be removed.
fwiw, it is nothing i can help with.

@telephon
Copy link
Member

telephon commented Sep 6, 2014

I can imagine that the maintainer of travis happens is on holiday. For now, we can simply ignore the warning, I think.

@sonoro1234
Copy link
Contributor

So. Will it be pulled or not?

@bagong
Copy link
Contributor

bagong commented Sep 6, 2014

Dan just did so.

@sonoro1234
Copy link
Contributor

#1189. is is still missing (target_add_definitionss -> target_compile_definitions)

@sonoro1234
Copy link
Contributor

As for the interprocess mingw stuff and according to https://svn.boost.org/trac/boost/ticket/10325
I undestand that I need to compile against boost 1.57 but in CMakeLists it looks for 1.50

if(SYSTEM_BOOST)
set(Boost_USE_MULTITHREADED ON)
find_package( Boost 1.50.0 COMPONENTS thread system filesystem program_options regex test_exec_monitor )
endif()

@sonoro1234
Copy link
Contributor

My fault: 1.50 is minimum version

@sonoro1234
Copy link
Contributor

I have used win32_api.hpp file provided in https://svn.boost.org/trac/boost/ticket/10325 and compiling works fine.
Anyone could make the substitution?

@bagong bagong mentioned this pull request Sep 9, 2014
@bagong
Copy link
Contributor

bagong commented Sep 9, 2014

I can confirm Victors finding, using MinGW gcc4.8.2. Scsynth and supernova go through fine (later it breaks in sclang).

@timblechmann timblechmann deleted the topic/boost_1_56_0 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