public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test
@ 2012-02-02 13:46 Michael Grønager
  2012-02-02 16:30 ` Luke-Jr
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Grønager @ 2012-02-02 13:46 UTC (permalink / raw)
  To: Bitcoin Dev

I have added a simplified fall back class to the boost::asio::signal_set. This should enable compilation on platforms with less than bleeding edge versions of Boost. Most notably most of the currently deployed Linux'es that use Boost 1.42.

I also updated the root CMakeLists.txt to only require 1.42. It works for me, but I also recognize the fact that committers machines has some intrinsic magic that just makes things work, hiding actual errors for the them ;)

Please test and feed back.

Cheers,

Michael


Michael Gronager, PhD
Director, Ceptacle
Jens Juels Gade 33
2100 Copenhagen E
Mobile: +45 31 45 14 01
E-mail: gronager@ceptacle•com
Web: http://www.ceptacle.com/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test
  2012-02-02 13:46 [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test Michael Grønager
@ 2012-02-02 16:30 ` Luke-Jr
  2012-02-02 22:43   ` Michael Grønager
  0 siblings, 1 reply; 4+ messages in thread
From: Luke-Jr @ 2012-02-02 16:30 UTC (permalink / raw)
  To: Michael Grønager; +Cc: bitcoin-development

On Thursday, February 02, 2012 8:46:05 AM Michael Grønager wrote:
> Please test and feed back.

I found the problem: you are trying to use static libraries. Best practices 
are to use shared libraries (except for specific scenarios like universal 
"Linux" binaries) and most distros do not have static libraries installed by 
default.

The coinQt stuff was also creating a problem.

I am able to build with this patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dea37c4..b876881 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,7 +352,7 @@ ENDIF(BDB_FOUND)
 #Note: We need as a minimum Boost 1.47 to support the signal_set used in 
Server. A backup signal_set has been created, though.
 SET(Boost_NO_BOOST_CMAKE ON)
 SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48" "1.48.0")
-SET(Boost_USE_STATIC_LIBS        ON)
+#SET(Boost_USE_STATIC_LIBS        ON)
 SET(Boost_USE_MULTITHREADED      ON)
 SET(Boost_USE_STATIC_RUNTIME    OFF)
 
@@ -804,9 +804,9 @@ SET(PKGCONFIG_FILES
 #  libcoin-coinMine
 )
 
-IF(QT4_FOUND)
-  SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} libcoin-coinQt)
-ENDIF(QT4_FOUND)
+#IF(QT4_FOUND)
+#  SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} libcoin-coinQt)
+#ENDIF(QT4_FOUND)
 
 FOREACH(PKGCONFIG_FILE ${PKGCONFIG_FILES})
   CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc.in
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0011392..67044d1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,9 +19,9 @@ FOREACH( mylibfolder
 
 ENDFOREACH()
 
-IF (QT4_FOUND AND NOT ANDROID)
-    ADD_SUBDIRECTORY(coinQt)
-ENDIF()
+#IF (QT4_FOUND AND NOT ANDROID)
+#    ADD_SUBDIRECTORY(coinQt)
+#ENDIF()
 
 IF(ANDROID)
     configure_file("${LIBCOIN_ANDROID_TEMPLATES}/Android.mk.src.in" 
"${CMAKE_CURRENT_BINARY_DIR}/Android.mk")



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test
  2012-02-02 16:30 ` Luke-Jr
@ 2012-02-02 22:43   ` Michael Grønager
  2012-02-02 23:27     ` Luke-Jr
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Grønager @ 2012-02-02 22:43 UTC (permalink / raw)
  To: Luke-Jr; +Cc: bitcoin-development

Thanks for the patch and the detective work!

Enabling dynamic libs was on my TODO, but on the Redmond_OS_not_to_be_mentioned you need to :
* prepend class definitions with __declspec(dllexport) when you compile the dll
* prepend class definitions with __declspec(dllimport) when you use the dll
I just love the way they spoil their developers...

I have the framework to automate this with CMake from a former project, but I havn't tested it for libcoin yet, hence the static build. And well, iOS also has this fetich for static libs.

I also recall another issue with dll's: If you define a global variable it is shared between all executables using this dll. I have still a handful of globals to clean out, namely those related to logging - I will do so, but it has not yet been a top priority. 

So, feel free to use dynamic libs on unix'es, but on windows it is .libs for a little while longer.

Will fix the Qt stuff in CMake - thanks!

Cheers,

Michael


On 02/02/2012, at 17:30, Luke-Jr wrote:

> On Thursday, February 02, 2012 8:46:05 AM Michael Grønager wrote:
>> Please test and feed back.
> 
> I found the problem: you are trying to use static libraries. Best practices 
> are to use shared libraries (except for specific scenarios like universal 
> "Linux" binaries) and most distros do not have static libraries installed by 
> default.
> 
> The coinQt stuff was also creating a problem.
> 
> I am able to build with this patch:
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index dea37c4..b876881 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -352,7 +352,7 @@ ENDIF(BDB_FOUND)
> #Note: We need as a minimum Boost 1.47 to support the signal_set used in 
> Server. A backup signal_set has been created, though.
> SET(Boost_NO_BOOST_CMAKE ON)
> SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48" "1.48.0")
> -SET(Boost_USE_STATIC_LIBS        ON)
> +#SET(Boost_USE_STATIC_LIBS        ON)
> SET(Boost_USE_MULTITHREADED      ON)
> SET(Boost_USE_STATIC_RUNTIME    OFF)
> 
> @@ -804,9 +804,9 @@ SET(PKGCONFIG_FILES
> #  libcoin-coinMine
> )
> 
> -IF(QT4_FOUND)
> -  SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} libcoin-coinQt)
> -ENDIF(QT4_FOUND)
> +#IF(QT4_FOUND)
> +#  SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} libcoin-coinQt)
> +#ENDIF(QT4_FOUND)
> 
> FOREACH(PKGCONFIG_FILE ${PKGCONFIG_FILES})
>   CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc.in
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index 0011392..67044d1 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -19,9 +19,9 @@ FOREACH( mylibfolder
> 
> ENDFOREACH()
> 
> -IF (QT4_FOUND AND NOT ANDROID)
> -    ADD_SUBDIRECTORY(coinQt)
> -ENDIF()
> +#IF (QT4_FOUND AND NOT ANDROID)
> +#    ADD_SUBDIRECTORY(coinQt)
> +#ENDIF()
> 
> IF(ANDROID)
>     configure_file("${LIBCOIN_ANDROID_TEMPLATES}/Android.mk.src.in" 
> "${CMAKE_CURRENT_BINARY_DIR}/Android.mk")

Michael Gronager, PhD
Director, Ceptacle
Jens Juels Gade 33
2100 Copenhagen E
Mobile: +45 31 45 14 01
E-mail: gronager@ceptacle•com
Web: http://www.ceptacle.com/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test
  2012-02-02 22:43   ` Michael Grønager
@ 2012-02-02 23:27     ` Luke-Jr
  0 siblings, 0 replies; 4+ messages in thread
From: Luke-Jr @ 2012-02-02 23:27 UTC (permalink / raw)
  To: Michael Grønager; +Cc: bitcoin-development

On Thursday, February 02, 2012 5:43:07 PM Michael Grønager wrote:
> Enabling dynamic libs was on my TODO, but on the
> Redmond_OS_not_to_be_mentioned you need to : * prepend class definitions
> with __declspec(dllexport) when you compile the dll * prepend class
> definitions with __declspec(dllimport) when you use the dll I just love
> the way they spoil their developers...

I hadn't even thought of this. Sounds like a pain :/

The problem I had was related to *using* static libraries; ie, boost.
I have libboost*.so, but libboost*.a



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-02 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 13:46 [Bitcoin-development] libcoin (HEAD) now supports boost < 1.47 - please test Michael Grønager
2012-02-02 16:30 ` Luke-Jr
2012-02-02 22:43   ` Michael Grønager
2012-02-02 23:27     ` Luke-Jr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox