From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8D8EC433EF for ; Mon, 22 Nov 2021 00:43:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0475C8321B; Mon, 22 Nov 2021 01:43:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="AakpvvVi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26C8C834F5; Mon, 22 Nov 2021 01:43:12 +0100 (CET) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FF0582FC4 for ; Mon, 22 Nov 2021 01:43:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 22 Nov 2021 09:42:56 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 496436ff619ae790; Mon, 22 Nov 2021 09:42:56 +0900 DKIM-Signature: a=rsa-sha256; b=AakpvvVi7rugs81QSwhjVAmWSdnvHhXBUZfEFRIxruc/SsCyWx8NPZ9ypV59Cj3jqQSuAz/yzw 7hiO2jZGKcC3SrMyGsIxGF7C6TKbFH0rwvTQOkNiXvCKJpyw1L04HE6GrYp8mRgu1+w9j/bGM3im woBrwEmwJE0f5L3vq4fVTbMIUcXHkmUV/YfaVr6IEPXEwGEw9QNy4xRyKDHUJa1xjAt7LiVociYn nTqfhEQ7v9XGk5vdPLpUzcmKyGx3+InN2uHTda6H8dgpo6zVneIbXjQaJCP0+Xg0MhWUiv0zPgEb wlC3NaNqOnpXuyy3qRcOCXY8Rku/IxY+mBYuPBPA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=mxvLTYSFH6mZKZGW6u6d8FtZFxK9qOkVbGDSHPL/0s8=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 0b082800619ae790; Mon, 22 Nov 2021 09:42:56 +0900 From: "Chan Kim" To: "'Ovidiu Panait'" , "'U-Boot Mailing List'" References: <008a01d7decd$3f3c0900$bdb41b00$@etri.re.kr> In-Reply-To: Subject: RE: link error while u-boot-spl build : undefined ref to `printf` or `strcmp` etc. Date: Mon, 22 Nov 2021 09:42:53 +0900 Message-ID: <009f01d7df39$e2de2c20$a89a8460$@etri.re.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQIIWgxlkiPuG1CvFpesJNrX76jEhwFEW6ciq6OcIdA= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Ovidiu, Thank you so much, with those two configs added, u-boot-spl was finally = built ok (The remaining 3 or 4 link errors are all gone together) Thank you, Best regards, Chan Kim > -----Original Message----- > From: Ovidiu Panait > Sent: Monday, November 22, 2021 12:30 AM > To: Chan Kim ; U-Boot Mailing List = > Subject: Re: link error while u-boot-spl build : undefined ref to = `printf` > or `strcmp` etc. >=20 > Hi Chan, >=20 > On 11/21/21 1:45 PM, Chan Kim wrote: > > [Please note: This e-mail is from an EXTERNAL e-mail address] > > > > Hello, > > > > When I build u-boot, I get this error at the end. (during u-boot-spl > build). > > > > I've been fixing some link errors by adding config values but I = can't > > figure out what is wrong with this. > > > > Below is the final command for u-boot-spl build and the error = messages. > > > > Can any expert tell me what can be wrong here? > > > > > > > > ( cd spl && aarch64-none-elf-gcc -nostdlib -nostartfiles > > -fuse-linker-plugin -flto=3D28 -Wall -Wstrict-prototypes > > -Wno-format-security -fno-builtin -ffreestanding -std=3Dgnu11 > > -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -flto=3D28 > > -fno-stack-protector -fno-delete-null-pointer-checks = -Wno-pointer-sign > > -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds > > -Wno-stringop-overflow -Wno-maybe-uninitialized = -fmacro-prefix-map=3D./=3D > > -g -fstack-usage -Wno-format-nonliteral = -Wno-address-of-packed-member > > -Wno-unused-but-set-variable -Werror=3Ddate-time = -Wno-packed-not-aligned > > -ffunction-sections -fdata-sections -fno-stack-protector = -D__KERNEL__ - > D__UBOOT__ -DCONFIG_SPL_BUILD -D__ARM__ > > -mstrict-align -fno-common -ffixed-r9 -mgeneral-regs-only -fno- > common > > -ffixed-x18 -pipe -march=3Darmv8-a+crc -D__LINUX_ARM_ARCH__=3D8 - > Ispl/include > > -Iinclude -I./arch/arm/include -include ./include/linux/kconfig.h > > -nostdinc -isystem > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ gcc/aarch64-none-elf/10.2.1/include -Wl,-T = -Wl,u-boot-spl.lds > > -Wl,--gc-sections -Wl,-Bstatic -Wl,--gc-sections > > -Wl,--no-dynamic-linker -Wl,--build-id=3Dnone -Wl,-Ttext = -Wl,0x4000000 > > arch/arm/cpu/armv8/start.o -Wl,--whole-archive > > arch/arm/cpu/armv8/built-in.o arch/arm/cpu/built-in.o > > arch/arm/lib/built-in.o board/etri/ab21m/built-in.o > > common/spl/built-in.o common/init/built-in.o common/built-in.o > > cmd/built-in.o env/built-in.o disk/built-in.o drivers/built-in.o > > dts/built-in.o fs/built-in.o keep-syms-lto.o -L > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1 -lgcc -Wl,--no-whole-archive > > -Wl,-Map,u-boot-spl.map -o u-boot-spl ) > > > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld: > > /tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function `alloc_simple': > > > > /home/ckim/U-BOOT/u-boot/spl/../common/malloc_simple.c:29: undefined > > reference to `printf' > > > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld: > > /tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function > `device_bind_by_name': > > > > /home/ckim/U-BOOT/u-boot/spl/../drivers/core/lists.c:31: undefined > > reference to `strcmp' > > > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld: > > /tmp/u-boot-spl.GeKfJh.ltrans0.ltrans.o: in function `board_init_r': > > > > /home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:697: undefined > > reference to `timer_init' > > > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld: > > /home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:690: undefined > > reference to `hang' > > > > = /opt/arm-toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/. > > ./lib/ > > gcc/aarch64-none-elf/10.2.1/../../../../aarch64-none-elf/bin/ld: > > /home/ckim/U-BOOT/u-boot/spl/../common/spl/spl.c:633: undefined > > reference to `printf' > > > > collect2: error: ld returned 1 exit status > > > > make[1]: *** [scripts/Makefile.spl:509: spl/u-boot-spl] Error 1 > > > > make: *** [Makefile:1984: spl/u-boot-spl] Error 2 >=20 > Could you try to enable CONFIG_SPL_LIBCOMMON_SUPPORT and > CONFIG_SPL_LIBGENERIC_SUPPORT Kconfig options? >=20 >=20 > Ovidiu >=20 > > > > > > Thank you. > > > > Chan Kim > >