From patchwork Mon Sep 26 09:03:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gonglei (Arei)" X-Patchwork-Id: 9350415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 097C96077B for ; Mon, 26 Sep 2016 09:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF32528CB2 for ; Mon, 26 Sep 2016 09:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3BB628CF5; Mon, 26 Sep 2016 09:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6AFF628CB2 for ; Mon, 26 Sep 2016 09:34:31 +0000 (UTC) Received: from localhost ([::1]:42749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boSIw-0006Jv-GO for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Sep 2016 05:34:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boRpd-0002dw-1Z for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boRpX-0001LT-2N for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:04:11 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:7953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boRpW-0001KD-GA for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:04:07 -0400 Received: from 172.24.1.136 (EHLO SZXEMA412-HUB.china.huawei.com) ([172.24.1.136]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DRO25882; Mon, 26 Sep 2016 17:03:52 +0800 (CST) Received: from SZXEMA503-MBS.china.huawei.com ([169.254.6.130]) by SZXEMA412-HUB.china.huawei.com ([10.82.72.71]) with mapi id 14.03.0235.001; Mon, 26 Sep 2016 17:03:46 +0800 From: "Gonglei (Arei)" To: "Daniel P. Berrange" Thread-Topic: Questions about gcc linker errors in crypto sub-directory Thread-Index: AdIX1OKUy3PfS6fTSwe2phqsamr3cg== Date: Mon, 26 Sep 2016 09:03:45 +0000 Message-ID: <33183CC9F5247A488A2544077AF19020B03D9371@SZXEMA503-MBS.china.huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.18.62] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.57E8E479.0028, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.6.130, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: aeed11c5eecf3a9b57e8dc599c5543f8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 58.251.152.64 Subject: [Qemu-devel] Questions about gcc linker errors in crypto sub-directory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "qemu-devel@nongnu.org" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi Daniel, I'm coding cryptodev-vhost-user.c as a new cryptodev backend, but the gcc report some linker errors: crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_crypto_cleanup': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:87: undefined reference to `vhost_dev_cleanup' crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_crypto_init': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:126: undefined reference to `vhost_dev_init' crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_user_opened': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:187: undefined reference to `qemu_chr_find' /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:194: undefined reference to `qemu_chr_fe_claim_no_fail' crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_user_event': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:213: undefined reference to `qemu_chr_set_reconnect_time' crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_user_init': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:257: undefined reference to `qemu_chr_add_handlers' crypto/cryptodev-vhost-user.o: In function `qcrypto_cryptodev_vhost_user_finalize': /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:353: undefined reference to `qemu_chr_add_handlers' /mnt/sdb/gonglei/qemu.git/qemu/crypto/cryptodev-vhost-user.c:354: undefined reference to `qemu_chr_fe_release' collect2: ld returned 1 exit status make: *** [qemu-nbd] Error 1 Currently I only change the crypto/Makefile.objs: Any others do I need to change? Thanks! Regards, -Gonglei diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index b9ad26a..575f64e 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -28,6 +28,7 @@ crypto-obj-y += block-qcow.o crypto-obj-y += block-luks.o crypto-obj-y += cryptodev.o crypto-obj-y += cryptodev-builtin.o +crypto-obj-y += cryptodev-vhost-user.o # Let the userspace emulators avoid linking gnutls/etc crypto-aes-obj-y = aes.o