* [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 @ 2014-03-13 17:45 Christian Mahnke 2014-03-13 18:05 ` Peter Maydell 0 siblings, 1 reply; 14+ messages in thread From: Christian Mahnke @ 2014-03-13 17:45 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 495 bytes --] Hi list, I'm trying to compile the the current HEAD of the Git repository on Mac OS X 10.9.2 using apple-gcc42 from Mac Ports I've got the following error: LINK qemu-nbd i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory c++-apple-4.2: Invalid arch name : -lcurl To me it seem the compiler got the options in the wrong order. Has anyone a hint how this can be fixed? Should I use a different compiler? As far as I have tested clang also doesn't work. Best, Christian [-- Attachment #2: Type: text/html, Size: 658 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 17:45 [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 Christian Mahnke @ 2014-03-13 18:05 ` Peter Maydell 2014-03-13 18:34 ` Christian Mahnke [not found] ` <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com> 0 siblings, 2 replies; 14+ messages in thread From: Peter Maydell @ 2014-03-13 18:05 UTC (permalink / raw) To: cmahnke; +Cc: QEMU Developers On 13 March 2014 17:45, Christian Mahnke <cmahnke@googlemail.com> wrote: > Hi list, > I'm trying to compile the the current HEAD of the Git repository on Mac OS X > 10.9.2 using apple-gcc42 from Mac Ports > > I've got the following error: > LINK qemu-nbd > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > c++-apple-4.2: Invalid arch name : -lcurl > > > To me it seem the compiler got the options in the wrong order. Has anyone a > hint how this can be fixed? > Should I use a different compiler? As far as I have tested clang also > doesn't work. I don't have a 10.9.x system, only 10.8.x, but on that clang builds work fine. Can you: 1. tell us what commands you used to configure and make? 2. pass "V=1" to make (which will cause it to print the full command lines it runs) and tell us what the link command that produced this error was? 3. tell us whether you're trying to do a build from within a directory with a space in the name... (For MacOSX builds these days we recommend using clang as supplied by Apple; it used to be necessary to build with gcc but it is not any more, and Mac gcc versions tend to be ancient. However that doesn't look like the problem to me.) thanks -- PMM ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 18:05 ` Peter Maydell @ 2014-03-13 18:34 ` Christian Mahnke [not found] ` <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com> 1 sibling, 0 replies; 14+ messages in thread From: Christian Mahnke @ 2014-03-13 18:34 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers [-- Attachment #1: Type: text/plain, Size: 3899 bytes --] Hi Peter, it' probably a problem with the configure script, clang raised the same error: Call to configure: ./configure --prefix=/opt/qemu-sparc --cc=cc --target-list=sparc-softmmu,sparc64-softmmu V=1 gmake gives c++ -m64 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wno-string-plus-int -Wno-initializer-overrides -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-all -I/opt/local/include -I/opt/local/include/p11-kit-1 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include/libusb-1.0 -I/opt/local/include/pixman-1 -I/Users/cmahnke/fun/qemu/dtc/libfdt -I/Users/cmahnke/fun/qemu/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -g -m64 -framework CoreFoundation -framework IOKit -arch x86_64 -g -o qemu-img aio-posix.o async.o block.o block/blkdebug.o block/blkverify.o block/bochs.o block/cloop.o block/cow.o block/curl.o block/dmg.o block/nbd-client.o block/nbd.o block/parallels.o block/qapi.o block/qcow.o block/qcow2-cache.o block/qcow2-cluster.o block/qcow2-refcount.o block/qcow2-snapshot.o block/qcow2.o block/qed-check.o block/qed-cluster.o block/qed-gencb.o block/qed-l2-cache.o block/qed-table.o block/qed.o block/raw-posix.o block/raw_bsd.o block/sheepdog.o block/snapshot.o block/ssh.o block/vdi.o block/vhdx-endian.o block/vhdx-log.o block/vhdx.o block/vmdk.o block/vpc.o block/vvfat.o blockjob.o coroutine-sigaltstack.o iohandler.o main-loop.o nbd.o qapi-types.o qapi-visit.o qemu-coroutine-io.o qemu-coroutine-lock.o qemu-coroutine-sleep.o qemu-coroutine.o qemu-img.o qemu-io-cmds.o qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a -L/opt/local/lib -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz -lz clang: error: no such file or directory: 'x86_64' clang: error: invalid arch name '-arch -lcurl' There are no spaces in the directory name. There is a patch for Mac Ports which looks to me if it tries to address a similar issue, but applying thin manually doesn't work. http://svn.macports.org/repository/macports/trunk/dports/emulators/qemu/files/patch-configure.diff Thanks again, Christian On Thu, Mar 13, 2014 at 7:05 PM, Peter Maydell <peter.maydell@linaro.org>wrote: > On 13 March 2014 17:45, Christian Mahnke <cmahnke@googlemail.com> wrote: > > Hi list, > > I'm trying to compile the the current HEAD of the Git repository on Mac > OS X > > 10.9.2 using apple-gcc42 from Mac Ports > > > > I've got the following error: > > LINK qemu-nbd > > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > > c++-apple-4.2: Invalid arch name : -lcurl > > > > > > To me it seem the compiler got the options in the wrong order. Has > anyone a > > hint how this can be fixed? > > Should I use a different compiler? As far as I have tested clang also > > doesn't work. > > I don't have a 10.9.x system, only 10.8.x, but on that clang > builds work fine. Can you: > > 1. tell us what commands you used to configure and make? > 2. pass "V=1" to make (which will cause it to print the > full command lines it runs) and tell us what the link > command that produced this error was? > 3. tell us whether you're trying to do a build from within > a directory with a space in the name... > > (For MacOSX builds these days we recommend using clang > as supplied by Apple; it used to be necessary to build > with gcc but it is not any more, and Mac gcc versions > tend to be ancient. However that doesn't look like the > problem to me.) > > thanks > -- PMM > [-- Attachment #2: Type: text/html, Size: 4796 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com>]
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 [not found] ` <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com> @ 2014-03-13 18:35 ` Peter Maydell 2014-03-13 18:42 ` Christian Mahnke 0 siblings, 1 reply; 14+ messages in thread From: Peter Maydell @ 2014-03-13 18:35 UTC (permalink / raw) To: cmahnke, QEMU Developers, Paolo Bonzini [put qemu-devel back on cc; I guess you accidentally dropped it] On 13 March 2014 18:22, Christian Mahnke <cmahnke@googlemail.com> wrote: > Hi, > the answers of two of your questions, there is no space in the directory > name. > > I'm running configure like this: > ./configure --prefix=/opt/qemu-sparc --cc=gcc > --target-list=sparc-softmmu,sparc64-softmmu > > The offending output of V=1 gmake: > > c++ -m64 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes > -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes > -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs > -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self > -Wold-style-definition -fstack-protector-all -I/opt/local/include > -I/opt/local/include/p11-kit-1 -I/opt/local/include > -I/opt/local/include/libpng16 -I/opt/local/include/libusb-1.0 > -I/opt/local/include/pixman-1 -I/Users/cmahnke/fun/qemu/dtc/libfdt > -I/Users/cmahnke/fun/qemu/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 > -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include > -I/opt/local/include -g -m64 -framework CoreFoundation -framework IOKit > -arch x86_64 -g -o qemu-io aio-posix.o async.o block.o block/blkdebug.o > block/blkverify.o block/bochs.o block/cloop.o block/cow.o block/curl.o > block/dmg.o block/nbd-client.o block/nbd.o block/parallels.o block/qapi.o > block/qcow.o block/qcow2-cache.o block/qcow2-cluster.o > block/qcow2-refcount.o block/qcow2-snapshot.o block/qcow2.o > block/qed-check.o block/qed-cluster.o block/qed-gencb.o block/qed-l2-cache.o > block/qed-table.o block/qed.o block/raw-posix.o block/raw_bsd.o > block/sheepdog.o block/snapshot.o block/ssh.o block/vdi.o > block/vhdx-endian.o block/vhdx-log.o block/vhdx.o block/vmdk.o block/vpc.o > block/vvfat.o blockjob.o coroutine-sigaltstack.o iohandler.o main-loop.o > nbd.o qapi-types.o qapi-visit.o qemu-coroutine-io.o qemu-coroutine-lock.o > qemu-coroutine-sleep.o qemu-coroutine.o qemu-io-cmds.o qemu-io.o > qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a -L/opt/local/lib > -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 > -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz -lz > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > c++-apple-4.2: Invalid arch name : -lcurl > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > c++-apple-4.2: Invalid arch name : -lcurl I have a feeling I know what may be happening here. -L/opt/local/lib -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 is I think the result of doing an alphabetical sort on the curl and ssh libraries, which is what rules.mak's extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)) \ $(foreach o,$(call expand-objs,$1),$($o-libs)))) does. Can you send us your config-host.mak, please? thanks -- PMM ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 18:35 ` Peter Maydell @ 2014-03-13 18:42 ` Christian Mahnke 2014-03-13 18:48 ` Peter Maydell 0 siblings, 1 reply; 14+ messages in thread From: Christian Mahnke @ 2014-03-13 18:42 UTC (permalink / raw) To: Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers [-- Attachment #1.1: Type: text/plain, Size: 3232 bytes --] Sorry about that, I will try to keep it in mind. I've attached the file. On Thu, Mar 13, 2014 at 7:35 PM, Peter Maydell <peter.maydell@linaro.org>wrote: > [put qemu-devel back on cc; I guess you accidentally dropped it] > > On 13 March 2014 18:22, Christian Mahnke <cmahnke@googlemail.com> wrote: > > Hi, > > the answers of two of your questions, there is no space in the directory > > name. > > > > I'm running configure like this: > > ./configure --prefix=/opt/qemu-sparc --cc=gcc > > --target-list=sparc-softmmu,sparc64-softmmu > > > > The offending output of V=1 gmake: > > > > c++ -m64 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE > > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes > > -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes > > -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs > > -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self > > -Wold-style-definition -fstack-protector-all -I/opt/local/include > > -I/opt/local/include/p11-kit-1 -I/opt/local/include > > -I/opt/local/include/libpng16 -I/opt/local/include/libusb-1.0 > > -I/opt/local/include/pixman-1 -I/Users/cmahnke/fun/qemu/dtc/libfdt > > -I/Users/cmahnke/fun/qemu/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 > > -D_REENTRANT -I/opt/local/include/glib-2.0 > -I/opt/local/lib/glib-2.0/include > > -I/opt/local/include -g -m64 -framework CoreFoundation -framework IOKit > > -arch x86_64 -g -o qemu-io aio-posix.o async.o block.o block/blkdebug.o > > block/blkverify.o block/bochs.o block/cloop.o block/cow.o block/curl.o > > block/dmg.o block/nbd-client.o block/nbd.o block/parallels.o block/qapi.o > > block/qcow.o block/qcow2-cache.o block/qcow2-cluster.o > > block/qcow2-refcount.o block/qcow2-snapshot.o block/qcow2.o > > block/qed-check.o block/qed-cluster.o block/qed-gencb.o > block/qed-l2-cache.o > > block/qed-table.o block/qed.o block/raw-posix.o block/raw_bsd.o > > block/sheepdog.o block/snapshot.o block/ssh.o block/vdi.o > > block/vhdx-endian.o block/vhdx-log.o block/vhdx.o block/vmdk.o > block/vpc.o > > block/vvfat.o blockjob.o coroutine-sigaltstack.o iohandler.o main-loop.o > > nbd.o qapi-types.o qapi-visit.o qemu-coroutine-io.o qemu-coroutine-lock.o > > qemu-coroutine-sleep.o qemu-coroutine.o qemu-io-cmds.o qemu-io.o > > qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a -L/opt/local/lib > > -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 > > -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz -lz > > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > > c++-apple-4.2: Invalid arch name : -lcurl > > i686-apple-darwin13-g++-apple-4.2.1: x86_64: No such file or directory > > c++-apple-4.2: Invalid arch name : -lcurl > > I have a feeling I know what may be happening here. > > -L/opt/local/lib > -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 > > is I think the result of doing an alphabetical sort on > the curl and ssh libraries, which is what rules.mak's > extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)) \ > $(foreach o,$(call expand-objs,$1),$($o-libs)))) > > does. Can you send us your config-host.mak, please? > > thanks > -- PMM > [-- Attachment #1.2: Type: text/html, Size: 3991 bytes --] [-- Attachment #2: config-host.mak --] [-- Type: application/octet-stream, Size: 3718 bytes --] # Automatically generated by configure - do not modify all: prefix=/opt/qemu-sparc bindir=${prefix}/bin libdir=${prefix}/lib libexecdir=${prefix}/libexec includedir=${prefix}/include mandir=${prefix}/share/man sysconfdir=${prefix}/etc qemu_confdir=${prefix}/etc/qemu qemu_datadir=${prefix}/share/qemu qemu_docdir=${prefix}/share/doc/qemu qemu_moddir=${prefix}/lib/qemu qemu_localstatedir=${prefix}/var qemu_helperdir=${prefix}/libexec extra_cflags=-m64 extra_ldflags= qemu_localedir=${prefix}/share/locale libs_softmmu=-L/opt/local/lib -lncurses -framework CoreAudio -L/opt/local/lib -lpng16 -lsasl2 -L/opt/local/lib -lgnutls -F/System/Library/Frameworks -framework Cocoa -framework IOKit -L$(BUILD_DIR)/dtc/libfdt -lfdt -L/opt/local/lib -lusb-1.0 -L/opt/local/lib -lpixman-1 ARCH=x86_64 STRIP=strip CONFIG_POSIX=y CONFIG_DARWIN=y CONFIG_SLIRP=y CONFIG_SMBD_COMMAND="/usr/sbin/smbd" CONFIG_AUDIO_DRIVERS=coreaudio CONFIG_COREAUDIO=y CONFIG_BDRV_RW_WHITELIST= CONFIG_BDRV_RO_WHITELIST= CONFIG_VNC=y CONFIG_VNC_TLS=y CONFIG_VNC_SASL=y CONFIG_VNC_PNG=y CONFIG_VNC_WS=y VNC_WS_CFLAGS= CONFIG_FNMATCH=y CONFIG_UUID=y VERSION=1.7.50 PKGVERSION= SRC_PATH=/Users/cmahnke/fun/qemu TARGET_DIRS=sparc-softmmu sparc64-softmmu BUILD_DOCS=yes CONFIG_COCOA=y CONFIG_CURSES=y CONFIG_CURL=m CURL_CFLAGS=-I/opt/local/include CURL_LIBS=-L/opt/local/lib -lcurl GLIB_CFLAGS=-D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include INSTALL_BLOBS=yes CONFIG_IOVEC=y CONFIG_FDT=y CONFIG_MADVISE=y CONFIG_POSIX_MADVISE=y CONFIG_USB_LIBUSB=y CONFIG_BSD=y CONFIG_UNAME_RELEASE="" CONFIG_QOM_CAST_DEBUG=y CONFIG_COROUTINE_BACKEND=sigaltstack CONFIG_COROUTINE_POOL=1 CONFIG_CPUID_H=y CONFIG_INT128=y CONFIG_LIBSSH2=m LIBSSH2_CFLAGS=-I/opt/local/include LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 CONFIG_VHDX=y HOST_USB=libusb legacy TRACE_BACKEND=nop CONFIG_TRACE_NOP=y CONFIG_TRACE_FILE=trace CONFIG_TRACE_DEFAULT=y TOOLS=qemu-ga$(EXESUF) qemu-nbd$(EXESUF) qemu-img$(EXESUF) qemu-io$(EXESUF) ROMS= MAKE=make INSTALL=install INSTALL_DIR=install -d -m 0755 INSTALL_DATA=install -c -m 0644 INSTALL_PROG=install -c -m 0755 INSTALL_LIB=install -c -m 0644 PYTHON=python -B CC=cc CC_I386=$(CC) -m32 HOST_CC=cc CXX=c++ OBJCC=clang AR=ar ARFLAGS=rv AS=as CPP=cc -E OBJCOPY=objcopy LD=ld WINDRES=windres LIBTOOL= CFLAGS=-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -g CFLAGS_NOPIE= QEMU_CFLAGS=-m64 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wno-string-plus-int -Wno-initializer-overrides -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-all -I/opt/local/include -I/opt/local/include/p11-kit-1 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include/libusb-1.0 -I/opt/local/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt QEMU_INCLUDES=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/i386 -I. -I$(SRC_PATH) -I$(SRC_PATH)/include AUTOCONF_HOST := LDFLAGS=-m64 -framework CoreFoundation -framework IOKit -arch x86_64 -g LDFLAGS_NOPIE= LIBTOOLFLAGS= -Wc,-fstack-protector-all LIBS+=-L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz LIBS_TOOLS+= EXESUF= DSOSUF=.so LDFLAGS_SHARED=-bundle -undefined dynamic_lookup LIBS_QGA+=-L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl POD2MAN=pod2man --utf8 TRANSLATE_OPT_CFLAGS= config-host.h: subdir-dtc ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 18:42 ` Christian Mahnke @ 2014-03-13 18:48 ` Peter Maydell 2014-03-13 18:53 ` Christian Mahnke 2014-03-14 12:29 ` Paolo Bonzini 0 siblings, 2 replies; 14+ messages in thread From: Peter Maydell @ 2014-03-13 18:48 UTC (permalink / raw) To: cmahnke; +Cc: Paolo Bonzini, QEMU Developers On 13 March 2014 18:42, Christian Mahnke <cmahnke@googlemail.com> wrote: > On Thu, Mar 13, 2014 at 7:35 PM, Peter Maydell <peter.maydell@linaro.org> > wrote: >> I have a feeling I know what may be happening here. >> >> -L/opt/local/lib >> -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 >> >> is I think the result of doing an alphabetical sort on >> the curl and ssh libraries, which is what rules.mak's >> extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)) \ >> $(foreach o,$(call expand-objs,$1),$($o-libs)))) >> >> does. Can you send us your config-host.mak, please? Yep, here we are: LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 CURL_LIBS=-L/opt/local/lib -lcurl rules.mak is incorrectly reordering the contents of these and generating a non-working mess. You should be able to work around this by passing configure --disable-libssh2 (this will disable ssh block device support, which you probably don't need, and will mean we don't give the compiler bogus arguments). thanks -- PMM ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 18:48 ` Peter Maydell @ 2014-03-13 18:53 ` Christian Mahnke 2014-03-14 12:29 ` Paolo Bonzini 1 sibling, 0 replies; 14+ messages in thread From: Christian Mahnke @ 2014-03-13 18:53 UTC (permalink / raw) To: Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers [-- Attachment #1: Type: text/plain, Size: 1251 bytes --] Thanks Peter! That works for me. On Thu, Mar 13, 2014 at 7:48 PM, Peter Maydell <peter.maydell@linaro.org>wrote: > On 13 March 2014 18:42, Christian Mahnke <cmahnke@googlemail.com> wrote: > > On Thu, Mar 13, 2014 at 7:35 PM, Peter Maydell <peter.maydell@linaro.org > > > > wrote: > >> I have a feeling I know what may be happening here. > >> > >> -L/opt/local/lib > >> -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 > >> > >> is I think the result of doing an alphabetical sort on > >> the curl and ssh libraries, which is what rules.mak's > >> extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)) \ > >> $(foreach o,$(call expand-objs,$1),$($o-libs)))) > >> > >> does. Can you send us your config-host.mak, please? > > Yep, here we are: > LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names > -arch x86_64 > CURL_LIBS=-L/opt/local/lib -lcurl > > rules.mak is incorrectly reordering the contents of > these and generating a non-working mess. > > You should be able to work around this by passing configure > --disable-libssh2 > (this will disable ssh block device support, which you probably > don't need, and will mean we don't give the compiler bogus > arguments). > > thanks > -- PMM > [-- Attachment #2: Type: text/html, Size: 1905 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-13 18:48 ` Peter Maydell 2014-03-13 18:53 ` Christian Mahnke @ 2014-03-14 12:29 ` Paolo Bonzini 2014-06-05 13:38 ` Rainer Müller 1 sibling, 1 reply; 14+ messages in thread From: Paolo Bonzini @ 2014-03-14 12:29 UTC (permalink / raw) To: Fam Zheng; +Cc: Peter Maydell, cmahnke, QEMU Developers Il 13/03/2014 19:48, Peter Maydell ha scritto: > Yep, here we are: > LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names > -arch x86_64 > CURL_LIBS=-L/opt/local/lib -lcurl > > rules.mak is incorrectly reordering the contents of > these and generating a non-working mess. Fam, is the $(sort) actually necessary in extract-libs? It is required in expand-objs, but duplicate -l options should be harmless. Paolo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-03-14 12:29 ` Paolo Bonzini @ 2014-06-05 13:38 ` Rainer Müller 2014-06-05 16:11 ` Peter Maydell 0 siblings, 1 reply; 14+ messages in thread From: Rainer Müller @ 2014-06-05 13:38 UTC (permalink / raw) To: qemu-devel On 2014-03-14 13:29, Paolo Bonzini wrote: > Il 13/03/2014 19:48, Peter Maydell ha scritto: >> Yep, here we are: >> LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names >> -arch x86_64 >> CURL_LIBS=-L/opt/local/lib -lcurl >> >> rules.mak is incorrectly reordering the contents of >> these and generating a non-working mess. > > Fam, > > is the $(sort) actually necessary in extract-libs? It is required in > expand-objs, but duplicate -l options should be harmless. The current master still contains this bug and sorts "-arch x86_64" separately. I doubt the $(sort) does anything useful. For the distribution of QEMU in MacPorts I removed the $(sort) from extract-libs in a local patch in order to be able to build some variants [1]. Rainer [1] https://trac.macports.org/browser/trunk/dports/emulators/qemu/files/patch-link-sort.diff?rev=120672 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-06-05 13:38 ` Rainer Müller @ 2014-06-05 16:11 ` Peter Maydell 2014-06-06 2:04 ` Fam Zheng 0 siblings, 1 reply; 14+ messages in thread From: Peter Maydell @ 2014-06-05 16:11 UTC (permalink / raw) To: Rainer Müller; +Cc: Fam Zheng, QEMU Developers On 5 June 2014 14:38, Rainer Müller <raimue@codingfarm.de> wrote: > On 2014-03-14 13:29, Paolo Bonzini wrote: >> Il 13/03/2014 19:48, Peter Maydell ha scritto: >>> Yep, here we are: >>> LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names >>> -arch x86_64 >>> CURL_LIBS=-L/opt/local/lib -lcurl >>> >>> rules.mak is incorrectly reordering the contents of >>> these and generating a non-working mess. >> >> Fam, >> >> is the $(sort) actually necessary in extract-libs? It is required in >> expand-objs, but duplicate -l options should be harmless. > > The current master still contains this bug and sorts "-arch x86_64" > separately. I doubt the $(sort) does anything useful. Ugh. This was supposed to be fixed by commit 6295b98d7b767c. Fam, can you re-check your fix, please? thanks -- PMM ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-06-05 16:11 ` Peter Maydell @ 2014-06-06 2:04 ` Fam Zheng 2014-06-10 10:23 ` Rainer Müller 0 siblings, 1 reply; 14+ messages in thread From: Fam Zheng @ 2014-06-06 2:04 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers, Rainer Müller On Thu, 06/05 17:11, Peter Maydell wrote: > On 5 June 2014 14:38, Rainer Müller <raimue@codingfarm.de> wrote: > > On 2014-03-14 13:29, Paolo Bonzini wrote: > >> Il 13/03/2014 19:48, Peter Maydell ha scritto: > >>> Yep, here we are: > >>> LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names > >>> -arch x86_64 > >>> CURL_LIBS=-L/opt/local/lib -lcurl > >>> > >>> rules.mak is incorrectly reordering the contents of > >>> these and generating a non-working mess. > >> > >> Fam, > >> > >> is the $(sort) actually necessary in extract-libs? It is required in > >> expand-objs, but duplicate -l options should be harmless. > > > > The current master still contains this bug and sorts "-arch x86_64" > > separately. I doubt the $(sort) does anything useful. > > Ugh. This was supposed to be fixed by commit 6295b98d7b767c. > Fam, can you re-check your fix, please? > I don't understand that fix now, looks like it was moved onto a wrong list. Rainer, does this below patch work for you? (we can't duplicate object, so sort is required there). Fam --- diff --git a/rules.mak b/rules.mak index b12d312..b895859 100644 --- a/rules.mak +++ b/rules.mak @@ -23,8 +23,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d QEMU_INCLUDES += -I$(<D) -I$(@D) maybe-add = $(filter-out $1, $2) $1 -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ - $(foreach o,$(call expand-objs,$1),$($o-libs))) +extract-libs = $(strip $(foreach o,$1,$($o-libs)) \ + $(sort $(foreach o,$(call expand-objs,$1),$($o-libs)))) expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(foreach o,$(filter %.mo,$1),$($o-objs)) \ $(filter-out %.o %.mo,$1)) ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-06-06 2:04 ` Fam Zheng @ 2014-06-10 10:23 ` Rainer Müller 2014-06-10 10:41 ` Fam Zheng 2014-06-10 11:19 ` Paolo Bonzini 0 siblings, 2 replies; 14+ messages in thread From: Rainer Müller @ 2014-06-10 10:23 UTC (permalink / raw) To: Fam Zheng, Peter Maydell; +Cc: QEMU Developers On 2014-06-06 04:04, Fam Zheng wrote: >> Ugh. This was supposed to be fixed by commit 6295b98d7b767c. >> Fam, can you re-check your fix, please? >> > > I don't understand that fix now, looks like it was moved onto a wrong list. > > Rainer, does this below patch work for you? (we can't duplicate object, so sort > is required there). No, unfortunately this does not work. With this patch, I end up with: $ make V=1 qemu-img ... ... qemu-img.o qemu-io-cmds.o qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a -lz -L/opt/local/lib -lcurl -L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz -lz clang: error: no such file or directory: 'x86_64' clang: error: invalid arch name '-arch -lcurl' make: *** [qemu-img] Error 1 You really can't just sort the words as their order is important, at least for some options such as "-arch" and its argument. >From config-host.mak: LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 I don't understand the make function $(extract-libs) here. First the contents of $o-libs is added as-is, but then it is added again filtered through $(expand-objs). What is the purpose of adding it twice? Regarding your proposed patch, it doesn't matter whether you sort the first list or the second list. Both lists include the problematic "-arch x86_64" linker option. Rainer ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-06-10 10:23 ` Rainer Müller @ 2014-06-10 10:41 ` Fam Zheng 2014-06-10 11:19 ` Paolo Bonzini 1 sibling, 0 replies; 14+ messages in thread From: Fam Zheng @ 2014-06-10 10:41 UTC (permalink / raw) To: Rainer Müller; +Cc: Peter Maydell, QEMU Developers On Tue, 06/10 12:23, Rainer Müller wrote: > On 2014-06-06 04:04, Fam Zheng wrote: > >> Ugh. This was supposed to be fixed by commit 6295b98d7b767c. > >> Fam, can you re-check your fix, please? > >> > > > > I don't understand that fix now, looks like it was moved onto a wrong list. > > > > Rainer, does this below patch work for you? (we can't duplicate object, so sort > > is required there). > > No, unfortunately this does not work. With this patch, I end up with: > > $ make V=1 qemu-img > ... > ... qemu-img.o qemu-io-cmds.o qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a -lz -L/opt/local/lib -lcurl -L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl -lz -lz > clang: error: no such file or directory: 'x86_64' > clang: error: invalid arch name '-arch -lcurl' > make: *** [qemu-img] Error 1 > > > You really can't just sort the words as their order is important, at > least for some options such as "-arch" and its argument. > > From config-host.mak: > > LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 > > I don't understand the make function $(extract-libs) here. First the > contents of $o-libs is added as-is, but then it is added again filtered > through $(expand-objs). What is the purpose of adding it twice? Good question. $(extract-libs) and $(expand-objs) are always used together, so I think we can drop it, together with the sort, hoping it works this time: diff --git a/rules.mak b/rules.mak index b12d312..1513b0f 100644 --- a/rules.mak +++ b/rules.mak @@ -23,8 +23,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d QEMU_INCLUDES += -I$(<D) -I$(@D) maybe-add = $(filter-out $1, $2) $1 -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \ - $(foreach o,$(call expand-objs,$1),$($o-libs))) +extract-libs = $(strip $(foreach o,$1,$($o-libs))) expand-objs = $(strip $(sort $(filter %.o,$1)) \ $(foreach o,$(filter %.mo,$1),$($o-objs)) \ $(filter-out %.o %.mo,$1)) ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 2014-06-10 10:23 ` Rainer Müller 2014-06-10 10:41 ` Fam Zheng @ 2014-06-10 11:19 ` Paolo Bonzini 1 sibling, 0 replies; 14+ messages in thread From: Paolo Bonzini @ 2014-06-10 11:19 UTC (permalink / raw) To: Rainer Müller, Fam Zheng, Peter Maydell; +Cc: QEMU Developers Il 10/06/2014 12:23, Rainer Müller ha scritto: > You really can't just sort the words as their order is important, at > least for some options such as "-arch" and its argument. > > From config-host.mak: > > LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 While we should fix it in QEMU, this is a bug in MacPorts. https://trac.macports.org/ticket/22747 You probably should report it and/or rebuild libssh2. Paolo ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-06-10 11:19 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-13 17:45 [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 Christian Mahnke 2014-03-13 18:05 ` Peter Maydell 2014-03-13 18:34 ` Christian Mahnke [not found] ` <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com> 2014-03-13 18:35 ` Peter Maydell 2014-03-13 18:42 ` Christian Mahnke 2014-03-13 18:48 ` Peter Maydell 2014-03-13 18:53 ` Christian Mahnke 2014-03-14 12:29 ` Paolo Bonzini 2014-06-05 13:38 ` Rainer Müller 2014-06-05 16:11 ` Peter Maydell 2014-06-06 2:04 ` Fam Zheng 2014-06-10 10:23 ` Rainer Müller 2014-06-10 10:41 ` Fam Zheng 2014-06-10 11:19 ` Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).