Skip to contentSkip to conversation

[5194] Fix the build on non-Linux systems

Qemu-devel Anthony Liguori 4 participants 10 messages Sep 11, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 5194

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

Modified Paths:
--------------
trunk/compatfd.h

Modified: trunk/compatfd.h
===================================================================

compatfd.h +1 -5
@@ -16,14 +16,10 @@
 
 #include <signal.h>
 
-#if defined(__linux__) && !defined(SYS_signalfd)
-struct signalfd_siginfo {
+struct qemu_signalfd_siginfo {
     uint32_t ssi_signo;
     uint8_t pad[124];
 };
-#else
-#include <linux/signalfd.h>
-#endif
 
 int qemu_signalfd(const sigset_t *mask);
 
#1 lore raw

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

Quoted 44 lines · Anthony Liguori

Revision: 5194

         http://svn.sv.gnu.org/viewvc/? 
view=rev&root=qemu&revision=5194
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

Modified Paths:
--------------
trunk/compatfd.h

Modified: trunk/compatfd.h
===================================================================

compatfd.h +1 -5
@@ -16,14 +16,10 @@
 
 #include <signal.h>
 
-#if defined(__linux__) && !defined(SYS_signalfd)
-struct signalfd_siginfo {
+struct qemu_signalfd_siginfo {
    uint32_t ssi_signo;
    uint8_t pad[124];
 };
-#else
-#include <linux/signalfd.h>
-#endif
 
 int qemu_signalfd(const sigset_t *mask);
 
#2 lore raw
Quoted 17 lines · C. W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

On Sep 11, 2008, at 8:18 AM, Anthony Liguori wrote:

Revision: 5194

http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194

Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)
Quoted 7 lines

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

On OpenBSD the final link fails because pthread symbols are missing.

#3 lore raw
Quoted 23 lines · Blue Swirl
Quoted 21 lines · C. W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

On Sep 11, 2008, at 8:18 AM, Anthony Liguori wrote:

Revision: 5194

http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194

Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

Quoted 7 lines
Quoted 4 lines

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

On OpenBSD the final link fails because pthread symbols are missing.

Do we use posix-aio on OpenBSD?

Regards,

Anthony Liguori

#4 lore raw
Quoted 35 lines · Anthony Liguori
Quoted 12 lines · Blue Swirl
Quoted 9 lines · C. W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

Quoted 5 lines
Quoted 5 lines · Anthony Liguori

Revision: 5194

http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194

Quoted 8 lines
Quoted 8 lines
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing

it to

Quoted 1 line
Quoted 1 line

remain readable forever. I'll fix this up but I thought I'd commit this

fix

Quoted 4 lines
Quoted 3 lines

in the interim.

Quoted 5 lines
Quoted 3 lines

On OpenBSD the final link fails because pthread symbols are missing.

Do we use posix-aio on OpenBSD?

No, AIO is not available.

#5 lore raw
In reply to Blue Swirl
Quoted 23 lines · Blue Swirl
Quoted 21 lines · C. W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

On Sep 11, 2008, at 8:18 AM, Anthony Liguori wrote:

Revision: 5194

http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194

Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

Quoted 7 lines
Quoted 4 lines

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

On OpenBSD the final link fails because pthread symbols are missing.

Does this help:

Makefile.target (working copy) renamed from Makefile.target (revision 5193) +0 -0
Index: Makefile.target
===================================================================
@@ -476,9 +476,13 @@

ifdef CONFIG_WIN32
OBJS+=block-raw-win32.o
else
-OBJS+=block-raw-posix.o compatfd.o
+OBJS+=block-raw-posix.o
endif

+ifdef CONFIG_AIO
+OBJS+=compatfd.o
+endif
+
LIBS+=-lz
ifdef CONFIG_ALSA
LIBS += -lasound

Makefile (working copy) renamed from Makefile (revision 5193) +0 -0
Index: Makefile
===================================================================
@@ -177,9 +177,13 @@

ifdef CONFIG_WIN32
QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-win32.o
else
-QEMU_IMG_BLOCK_OBJS += nbd.o qemu-img-block-raw-posix.o compatfd.o +QEMU_IMG_BLOCK_OBJS += nbd.o qemu-img-block-raw-posix.o endif

+ifdef CONFIG_AIO
+QEMU_IMG_BLOCK_OBJS += compatfd.o
+endif
+
######################################################################

qemu-img$(EXESUF): qemu-img.o qemu-img-block.o $(QEMU_IMG_BLOCK_OBJS)

configure (working copy) renamed from configure (revision 5193) +0 -0
Index: configure
===================================================================
@@ -1220,6 +1220,7 @@

fi
if test "$aio" = "yes" ; then
echo "#define CONFIG_AIO 1" >> $config_h
+ echo "CONFIG_AIO=yes" >> $config_mak
fi

# XXX: suppress that

Regards,

Anthony Liguori

#6 lore raw
Quoted 35 lines · Anthony Liguori
Quoted 12 lines · Blue Swirl
Quoted 9 lines · C. W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

Quoted 5 lines
Quoted 5 lines · Anthony Liguori

Revision: 5194

http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194

Quoted 8 lines
Quoted 8 lines
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing

it to

Quoted 1 line
Quoted 1 line

remain readable forever. I'll fix this up but I thought I'd commit this

fix

Quoted 4 lines
Quoted 3 lines

in the interim.

Quoted 5 lines
Quoted 3 lines

On OpenBSD the final link fails because pthread symbols are missing.

Does this help:

Yes, that does it.

#7 lore raw
In reply to C.W. Betts

Actually, it builds in 10.5. Using the 10.4 SDK causes the problems.

Quoted 54 lines · C.W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

Quoted 43 lines · Anthony Liguori

Revision: 5194

         http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

Modified Paths:
--------------
trunk/compatfd.h

Modified: trunk/compatfd.h
===================================================================

compatfd.h +1 -5
@@ -16,14 +16,10 @@
 
 #include <signal.h>
 
-#if defined(__linux__) && !defined(SYS_signalfd)
-struct signalfd_siginfo {
+struct qemu_signalfd_siginfo {
    uint32_t ssi_signo;
    uint8_t pad[124];
 };
-#else
-#include <linux/signalfd.h>
-#endif
 
 int qemu_signalfd(const sigset_t *mask);
 
#8 lore raw

And it also doesn't link on 64-bit…
I don't know what library has the sigwaitinfo call on it, nor do I know what headers define it. Spotlight only found one file, compatfd.c, and mail messages that reference it.

Quoted 35 lines · C.W. Betts

Actually, it builds in 10.5. Using the 10.4 SDK causes the problems.

Quoted 31 lines · C.W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd.

Quoted 20 lines · Anthony Liguori

Revision: 5194

         http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5194
Author:   aliguori
Date:     2008-09-11 14:18:56 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Fix the build on non-Linux systems

It turns out, we're never reading from the signalfd() which is causing it to remain readable forever. I'll fix this up but I thought I'd commit this fix in the interim.

Modified Paths:
--------------
trunk/compatfd.h

#9 lore raw
Quoted 2 lines · C.W. Betts

And it also doesn't link on 64-bit…
I don't know what library has the sigwaitinfo call on it, nor do I know what headers define it. Spotlight only found one file, compatfd.c, and mail messages that reference it.

sigwaitinfo is part of POSIX. Is sigtimedwait() available? What about just sigwait()?

Regards,

Anthony Liguori

Quoted 15 lines · C.W. Betts
Quoted 13 lines

Actually, it builds in 10.5. Using the 10.4 SDK causes the problems.

Quoted 9 lines · C.W. Betts

Now it complains about missing symbols:
Undefined symbols:
"_sigwaitinfo", referenced from:
_sigwait_compat in compatfd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
This happened both when trying to compile qemu-img and qemu-nbd. On Sep 11, 2008, at 8:18 AM, Anthony Liguori wrote: