Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] ola: Add patch to fix linking issue
@ 2015-08-05  4:19 Simon Marchi
  2015-08-05  7:58 ` Nicolas Cavallari
  2015-08-08 10:44 ` Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Simon Marchi @ 2015-08-05  4:19 UTC (permalink / raw)
  To: buildroot

This patch fixes this autobuild failure:

  http://autobuild.buildroot.net/results/e14/e14e1700d4fe359c56be57587bdb509e002e5753/build-end.log

I am not 100% sure of what happens (I am not a C++ expert at all), but
here it is anyway.  I assume that when the definition of
TCPSocket::ReadDescriptor is embedded in the class definition, no actual
implementation is generated (all usages of it are inline).  When object
libolaopenpixelcontrol.so tries to reference it somehow, it results in
an undefined reference.  Moving the definition in the cpp retains it. If
you have a clear explanation of what happens, I'd be happy to read it.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
---
 ...link-ola-network-TCPSocket-ReadDescriptor.patch | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/ola/Fix-link-ola-network-TCPSocket-ReadDescriptor.patch

diff --git a/package/ola/Fix-link-ola-network-TCPSocket-ReadDescriptor.patch b/package/ola/Fix-link-ola-network-TCPSocket-ReadDescriptor.patch
new file mode 100644
index 0000000..8c9385b
--- /dev/null
+++ b/package/ola/Fix-link-ola-network-TCPSocket-ReadDescriptor.patch
@@ -0,0 +1,28 @@
+Index: ola-0.9.6/common/network/TCPSocket.cpp
+===================================================================
+--- ola-0.9.6.orig/common/network/TCPSocket.cpp
++++ ola-0.9.6/common/network/TCPSocket.cpp
+@@ -163,6 +163,10 @@ TCPSocket* TCPSocket::Connect(const Sock
+   return socket;
+ }
+ 
++ola::io::DescriptorHandle TCPSocket::ReadDescriptor() const
++{
++  return m_handle;
++}
+ 
+ // TCPAcceptingSocket
+ // ------------------------------------------------
+Index: ola-0.9.6/include/ola/network/TCPSocket.h
+===================================================================
+--- ola-0.9.6.orig/include/ola/network/TCPSocket.h
++++ ola-0.9.6/include/ola/network/TCPSocket.h
+@@ -47,7 +47,7 @@ class TCPSocket: public ola::io::Connect
+ 
+   ~TCPSocket() { Close(); }
+ 
+-  ola::io::DescriptorHandle ReadDescriptor() const { return m_handle; }
++  ola::io::DescriptorHandle ReadDescriptor() const;
+   ola::io::DescriptorHandle WriteDescriptor() const { return m_handle; }
+   bool Close();
+ 
-- 
2.4.5

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

end of thread, other threads:[~2015-08-10 19:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05  4:19 [Buildroot] [PATCH] ola: Add patch to fix linking issue Simon Marchi
2015-08-05  7:58 ` Nicolas Cavallari
2015-08-05 14:54   ` Simon Marchi
2015-08-08 10:44 ` Thomas Petazzoni
2015-08-10  3:11   ` Simon Marchi
2015-08-10 12:44     ` Thomas Petazzoni
2015-08-10 17:45       ` Simon Marchi
2015-08-10 19:09         ` Thomas Petazzoni

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