From nobody Tue Jun 15 20:52:03 2021 X-Original-To: freebsd-ppc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DB40B11E572C for ; Tue, 15 Jun 2021 20:52:11 +0000 (UTC) (envelope-from al@datazap.net) Received: from mail-oi1-f227.google.com (mail-oi1-f227.google.com [209.85.167.227]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G4L966yHKz3KJ5 for ; Tue, 15 Jun 2021 20:52:10 +0000 (UTC) (envelope-from al@datazap.net) Received: by mail-oi1-f227.google.com with SMTP id c13so19620646oib.13 for ; Tue, 15 Jun 2021 13:52:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=vJG+VQizhHgb6Zi4f+jb+prWcLrMiQ359hSaIIQ3FP4=; b=Dm6v00ECLVkG+MhGGo7Rxoo+XKhyCXo0qGY9YbtqJCBC9GZbmdsqOs6Fhg4d7UCEsQ 6Du9juwG7HMbpMTRsIxcHzFRdQzNLY223psEpLPrF9ZJ8jmK+XbGL0Vs+lQsPpux5uE9 oAGdeT7sgcuEdfq3GDTddhlBdjb6uo5LjSaM6n+8jEK/4GF+o7LLNJSAom5RGbIRhLm2 mRZezbU+kIOclkD11Ymv+HncBQ184g3k+M98NG4WKP4BRMNyHwr2aOA8i0hHPB7Y0x0g 5wt1FFTDfU4PhZ9clcTUI3HudIxKDr+Ccf2gxnz4HHXvGl6dBjcQbisYbHWEYsEEI8o7 4cNg== X-Gm-Message-State: AOAM530hxs7ahASiGRqfkycbOogtcw4tFx+4eYcfp20GPpX677JdcQNw SUTj2WdUf47bgs21qp68L0PAZtf0jroDSCTAXZB6EfdQQ+a5Jw== X-Google-Smtp-Source: ABdhPJz84YkTRW2uAFGMzufOizfgo0p8RWlvIyKuGzUqzU0aVWo6SHnroW31MjmJGE3JdEf4tfqd7zECJ/ag X-Received: by 2002:a54:4802:: with SMTP id j2mr4665566oij.125.1623790329760; Tue, 15 Jun 2021 13:52:09 -0700 (PDT) Received: from agnus.datazap.net (agnus.datazap.net. [209.160.40.35]) by smtp-relay.gmail.com with ESMTP id e31sm38812oow.16.2021.06.15.13.52.09; Tue, 15 Jun 2021 13:52:09 -0700 (PDT) X-Relaying-Domain: datazap.net Received: from [127.0.0.1] (localhost [127.0.0.1]) by agnus.datazap.net (Postfix) with ESMTP id E5F58B794B; Tue, 15 Jun 2021 16:52:04 -0400 (EDT) Subject: Re: compiling error To: Justin Hibbits , al@familysafeinternet.com Cc: Mark Millard , freebsd-ppc@freebsd.org References: <77ae252f-a06e-07e0-8d8f-d8ec87d2689e@datazap.net> <531AC187-0031-4273-879C-516C5284396D@yahoo.com> <9f3abafa-3edc-aaf5-2bac-7a83599251c8@datazap.net> <20210615153339.1d9281b5@ralga.knownspace> From: al@familysafeinternet.com Message-ID: Disposition-Notification-To: al@familysafeinternet.com Date: Tue, 15 Jun 2021 16:52:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org MIME-Version: 1.0 In-Reply-To: <20210615153339.1d9281b5@ralga.knownspace> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4G4L966yHKz3KJ5 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of al@datazap.net has no SPF policy when checking 209.85.167.227) smtp.mailfrom=al@datazap.net X-Spamd-Result: default: False [0.20 / 15.00]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com,familysafeinternet.com]; FORGED_SENDER(0.30)[al@familysafeinternet.com,al@datazap.net]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.227:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[al@familysafeinternet.com,al@datazap.net]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_THREE(0.00)[4]; HEADER_FORGED_MDN(2.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[familysafeinternet.com]; SPAMHAUS_ZRD(0.00)[209.85.167.227:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.227:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.227:from]; FREEMAIL_CC(0.00)[yahoo.com,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-ppc] X-ThisMailContainsUnwantedMimeParts: N On 15/06/21 16:33, Justin Hibbits wrote: > On Tue, 15 Jun 2021 14:18:16 -0400 > al@familysafeinternet.com wrote: > >> On 14/06/21 19:26, Mark Millard wrote: >>> On 2021-Jun-14, at 15:05, al at familysafeinternet.com wrote: >>> >>>> I hope that someone can help me. I broke my install of FreeBSD and >>>> I went back to my G3 and tried to compile a new kernel so that I >>>> would not need the serial console anymore, but even if I try to >>>> compile the old kernel it still stops with: >>>> >>>> -------------------------------------------------------------- >>>>>>> stage 3.1: building everything >>>> -------------------------------------------------------------- >>>> cd /usr/obj/usr/src/powerpc.powerpc64/sys/AMIGAX5000; >>>> MACHINE_ARCH=powerpc64 MACHINE=powerpc CPUTYPE= CC="cc >>>> --sysroot=/usr/obj/usr/src/powerpc.powerpc64/tmp >>>> -B/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/bin" CXX="c++ >>>> --sysroot=/usr/obj/usr/src/powerpc.powerpc64/tmp >>>> -B/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/bin" CPP="cpp >>>> --sysroot=/usr/obj/usr/src/powerpc.powerpc64/tmp >>>> -B/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/bin" AS="as" AR="ar" >>>> LD="ld" LLVM_LINK="" NM=nm OBJCOPY="objcopy" RANLIB=ranlib >>>> STRINGS= SIZE="size" INSTALL="sh /usr/src/tools/install.sh" >>>> PATH=/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/sbin:/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/bin:/usr/obj/usr/src/powerpc.powerpc64/tmp/legacy/usr/sbin:/usr/obj/usr/src/powerpc.powerpc64/tmp/legacy/usr/bin:/usr/obj/usr/src/powerpc.powerpc64/tmp/legacy/bin::/sbin:/bin:/usr/sbin:/usr/bin >>>> make -m /usr/src/share/mk KERNEL=kernel all -DNO_MODULES_OBJ >>>> machine -> /usr/src/sys/powerpc/include cc >>>> --sysroot=/usr/obj/usr/src/powerpc.powerpc64/tmp >>>> -B/usr/obj/usr/src/powerpc.powerpc64/tmp/usr/bin -c -O -pipe -g >>>> -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include >>>> -I/usr/src/sys/contrib/libfdt -D_KERNEL >>>> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -msoft-float >>>> -fPIC -fno-omit-frame-pointer -MD -MF.depend.genoffset.o >>>> -MTgenoffset.o -mno-altivec -msoft-float -ffreestanding -fwrapv >>>> -fstack-protector -gdwarf-2 -Wall -Wredundant-decls >>>> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes >>>> -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign >>>> -fformat-extensions -Wmissing-include-dirs >>>> -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-uninitialized >>>> -Wno-format-zero-length -fms-extensions -finline-limit=15000 >>>> --param inline-unit-growth=100 --param large-function-growth=1000 >>>> -fms-extensions -Wa,-many -mcall-aixdesc -std=iso9899:1999 >>>> /usr/src/sys/kern/genoffset.c /usr/src/sys/kern/genoffset.c:1: >>>> error: -fPIC and -mcall-aixdesc are incompatible *** Error code 1 >>>> >>>> Stop. >>>> make[2]: stopped in >>>> /usr/obj/usr/src/powerpc.powerpc64/sys/AMIGAX5000 *** Error code 1 >>>> >>>> Stop. >>>> make[1]: stopped in /usr/src >>>> *** Error code 1 >>>> >>>> Stop. >>>> make: stopped in /usr/src >>>> >>>> I am using source from before we switched to clang. >>>> >>>> The issue is with the offset, but I don't know why it is suddenly >>>> a problem, because it compiled before. Any thoughts? >> Hi, I am sorry about the lack of information in this email, I was in >> a hurry and wasn't thinking. >> >>> You make no mention of what svn or git branch and version of the >>> FreeBSD source is being compiled, no output from svnlite or git >>> indicating such. >> root@host:/usr/src # svnlite info --show-item revision >> 351650 >> >> >>> You do not show anything like the "uname -apKU" output for the >>> context doing the build. >> FreeBSD host.datazap.net 13.0-CURRENT FreeBSD 13.0-CURRENT r351067 >> GENERIC powerpc powerpc 1300039 1300039 >> >>> Looks to me like ${MACHINE_CPUARCH} == "powerpc" got -fPIC >>> in sys/conf/kmod.mk in svn path=/head/; revision=356114 >>> at 2019-12-27 04:07:51 +0000. >>> >>> -mcall-aixdesc is older then that if I understand right. >>> >>> But a G3 means 32-bit powerpc is doing the build while you >>> are targeting something under: >>> >>> /usr/obj/usr/src/powerpc.powerpc64/ >> I want to compile a kernel a new kernel with a frame buffer for a >> X5000, because I was going to reinstall it anyway. Less that I have >> to do on the X5000 with a serial console. >> >> # >> # Custom kernel for Freescale MPC85XX development boards like the CDS >> etc. # >> # $FreeBSD: head/sys/powerpc/conf/MPC85XX 277254 2015-01-16 17:41:21Z >> nwhitehorn $ >> # >> >> ident AMIGAX5000 >> >> include QORIQ64 >> >> #options BUS_DEBUG >> #options DEBUG >> #options EARLY_PRINTF >> #options MPC85XX_UART_PA=0xffe11c000ull >> #options KTR >> #options KTR_COMPILE=(KTR_PMAP) >> #options KTR_MASK=(KTR_PMAP) >> #options KTR_ENTRIES=8192 >> #options KTR_VERBOSE >> >> options PREEMPTION # Enable kernel thread >> preemption options GEOM_PART_EBR # Extended Boot >> Records options GEOM_PART_EBR_COMPAT # Backward compatible >> partition names >> options GEOM_PART_APM # Apple Partition Maps. >> options ZFS >> >> device ukbd >> device ums >> >> # For SAS RAID >> #device pci >> #device aacraid >> >> # For Video >> device vt >> device fbd >> device kbdmux >> options KBD_INSTALL_CDEV >> >> # No Netboot >> nooptions BOOTP >> nooptions BOOTP_NFSROOT >> >> # For Alex >> #device nvme >> nooptions INVARIANTS >> nooptions INVARIANT_SUPPORT >> nooptions WITNESS >> nooptions WITNESS_SKIPSPIN >> >>> So it is a form of cross-build (not even a self-hosted limiting >>> condition one: one that produces incompatible code). You give >>> no details of how you set up the cross-build. >> To cross compile I used: >> make buildkernel TARGET_ARCH=powerpc64 KERNCONF=AMIGAX5000 >> >> Is there something else that is needed to make this compile? > Try first 'make kernel-toolchain TARGET_ARCH=powerpc64' beforehand. > > - Justin Justin, will give it a try. Thank you! -Al >>> My guess is the cross-build attempt is using compiler option >>> combinations that would work in a native powerpc64 environment >>> but not with the 32-bit powerpc toolchain that is in use. Or: >>> the build might have mixed the 32-bit context options and the >>> powerpc64 context options by having some tests that incorrectly >>> tests host context vs. target context for choosing options. >>> >> I was able to build a working kernel and userland before on the G3 >> and then recompile everything on the X5000. It maybe that my hard >> drive has failed. >> >> Please let me know if you need other information. >> >> Thanks, >> Al >> >> >> >>