Re: Clean Install on Ubuntu Natty Fails

"idmsago" <[email protected]>
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Ah, git - fine. That explains why it works on my Natty dev box without removing the line.

I guess it would be good to list the dependencies somewhere. Have I missed where that might be?

...

On libevent, no, its not being picked it up, it isn't in CMakeCache.txt 

$ grep "Socket" CMakeCache.txt 

$ grep "event" CMakeCache.txt 

$ cmake .. | grep "event"

Puzzling. I don't know much about cmake, but I'll have a dig.

... one hour later ...

It seems to me there's a bug in addons/CMakeLists.txt

Looking back over the file history, in e5f2cc27 Christian Kellerman attempted to get Io running on OpenBSD. He could only do so by disabling Socket entirely:

-add_subdirectory(Socket)
+#add_subdirectory(Socket)

Along came Jeremy then in fd3fd962, describing the above change (rightly imho) as "braindead" ;) and corrected it to do a proper check for OpenBSD and only disable Socket in that case:

-#add_subdirectory(Socket)
+if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") # This hsould not be disabled for any platform. Upgrade Socket to support libevent2
+  add_subdirectory(Socket)
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

Unfortunately, spelling 'should' wrong in the comment wasn't the only mistake :) Correcting braindead commits in frustration is annoying enough to make such an error totally understandable.

Anyway, adding the crucial NOT made the cmake work for me, and Socket is now present. Obv. I haven't tested it on any other platforms, particularly OpenBSD.

I forked Steve's repo, committed and issued a pull request. Diff is.

$ git diff
diff --git a/addons/CMakeLists.txt b/addons/CMakeLists.txt
index 25360bf..a12667a 100755
--- a/addons/CMakeLists.txt
+++ b/addons/CMakeLists.txt
@@ -102,9 +102,9 @@ add_subdirectory(SQLite3)
 #add_subdirectory(SampleRateConverter)
 add_subdirectory(SecureSocket)
 #add_subdirectory(SkipDB) # XXX: Disabled...why?
-if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") # This hsould not be disabled for an
+if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") # This should not be disabled fo
   add_subdirectory(Socket)
-endif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
 #add_subdirectory(SoundTouch) # XXX: I can't meet dependencies
 add_subdirectory(SqlDatabase)
 add_subdirectory(Syslog)

Please scream if I've committed a cmake or other faux-pas. Never looked at cmake before now.

Ian.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.