From nobody Thu Mar 30 14:56:09 2023 X-Original-To: freebsd-current@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 4PnRM0684cz41sgl for ; Thu, 30 Mar 2023 14:56:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PnRLz1KGdz40Lr for ; Thu, 30 Mar 2023 14:56:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=LvW6CZ6o; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2001:4860:4864:20::2c as permitted sender) smtp.mailfrom=mjguzik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-17ab3a48158so20020661fac.1 for ; Thu, 30 Mar 2023 07:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680188170; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=h/q9Xvbba04qh55oYUuWBk5vMzhlLbfGrn5j1pVvuy0=; b=LvW6CZ6omxiPAnW3dfSkN4Iis6U23UBACxzrpTSRtwlXhqjnPnqJZBEwFI9pVvBLl1 OJ9SvNFXoB/Rp7nqnvzqHsO3GYLBDxqpcpul1NQMXd1OoCULJyf2JWnzttOaVfUg8CZB i0fTElquacJQQkGOR+HPkjkE9+ARsSLDRFhLinz9m0nNcqLQG5h2sZZzywYux2QdFPOg Ht89BOV7GL7iIU2wEg4VjFDXrS6cUglob21RtPeaMzVzAjfKqMTtf+8DgfgB5DisVV6H 26ujZIwXCvxTpgdI5zcd507JEjaL+NHVh0WYsvpJ0LJoHaqxuFOgvh1z1wMXx4uLY7d7 9bow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680188170; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h/q9Xvbba04qh55oYUuWBk5vMzhlLbfGrn5j1pVvuy0=; b=YaswvPajmla3t+sXuSjQgRFTk0R7H59abhztLiDJFJGolulldSS/VgkG/++NNMnxi0 cQPbE4bkYSTS+0mXahk8hc+GmKpztLEuKV9kXY+56niPZ3ceb4pVzwkNTBjJo3wKVOr5 eIszIBrGTQLapCdq9T8/5pPviskXhN4UOyAzSwM2LSB7GaB+QkhRk8/I8KO1ifjvIRAR S2G40g8u2aAcyY0Dgrwe9HldUMBUdzCxhtp6xx5wrSHXSmVTaPIZ4rhxmc8yg6Kiphep R3ui7prQeqDSwVH9G6Ytj70TYTyZI7HUd64da6r2w4sUkB6VvVhpEtVEAXLNQCEnVtSt 3pRg== X-Gm-Message-State: AAQBX9cuppbndHWBcQeYNKvmCYliqDen1lyXOQpfgm/mvk6CKbAfUC/w bQOKZ039+XkO/bEbu2EHMNoOgby7KJiWHgFPF0Nq0Yw2 X-Google-Smtp-Source: AKy350ZLsIr82in1ZjgJLI56wzHfiHHrga/9Le5ZBo4xRSdeP4W3cVPXvx7zBw57qLuTqP0TZSIIlftsRTtgJB9A0LQ= X-Received: by 2002:a05:6870:f916:b0:177:ca1c:2cd5 with SMTP id ao22-20020a056870f91600b00177ca1c2cd5mr7536101oac.4.1680188170126; Thu, 30 Mar 2023 07:56:10 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:7598:0:b0:49c:b071:b1e3 with HTTP; Thu, 30 Mar 2023 07:56:09 -0700 (PDT) In-Reply-To: References: <20230330154545.5f957aa6@thor.intern.walstatt.dynvpn.de> From: Mateusz Guzik Date: Thu, 30 Mar 2023 16:56:09 +0200 Message-ID: Subject: Re: NanoBSD: CURRENT unable to compile 13-STABLE : ld: error: args.o: Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM15.0.7' Reader: 'LLVM 14.0.5') To: FreeBSD User Cc: FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2001:4860:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2001:4860:4864:20::2c:from]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4PnRLz1KGdz40Lr X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 3/30/23, Mateusz Guzik wrote: > On 3/30/23, FreeBSD User wrote: >> Hello folks, >> >> some strange misbehaviour in a NanoBSD compilation is driving me nuts. >> Recently I posted some >> error messages regarding >> >> [...] >> src/sys/dev/an/if_an_pci.c:143:1: error: a >> function definition without a prototype is deprecated in all versions of >> C >> and is not >> supported in C2x [-Werror,-Wdeprecated-non-prototype] >> [...] >> >> but being able compiling the kernel was "a lucky shot/mistake" and in the >> vain of discussion >> it has been revealed that my nanoBSD specific "make.conf/src.conf" >> configurations were wrong. >> >> So, again: >> >> The builder host is a recent CURRENT (FreeBSD 14.0-CURRENT #2 >> main-n261876-f5a365e51fee: Thu >> Mar 30 11:23:19 CEST 2023 amd64), the target is a most recent 13-STABLE >> (git >> pull on a >> daily/hourly/most recentl basis when trying to build). >> >> As I understand the src/buildworld config, it seems crucial to have >> CURRENT >> and 13-STABLE >> somehow separated due to their divergende in used LLVM/CLANG (CURRENT has >> LLVM 15, 13-STABLE >> is with LLVM 14). >> >> Putting >> >> WITHOUT_SYSTEM_COMPILER=YES >> WITHOUT_SYSTEM_LINKER=YES >> >> into CONF_BUILD= AND CONF_WORLD= of NanoBSD configuration should prevent >> the >> usage of >> CURRENT's LLVM 15 and instead a cross compiling with 13-STABLE's LLVM 14 >> compiler and linker >> should be used to buildworld. >> >> But this doesn't seem to happen (at least in my case), since buildworld >> fails to build with: >> >> [...] >> cc -target x86_64-unknown-freebsd13.2 >> --sysroot=/pool/home/ohartmann/Projects/router/router/apu2c4/world/obj/amd64/ALERICH_13-STABLE_amd64/pool/home/ohartmann/Projects/router/router/apu2c4/src/amd64.amd64/tmp >> -B/pool/home/ohartmann/Projects/router/router/apu2c4/world/obj/amd64/ALERICH_13-STABLE_amd64/pool/home/ohartmann/Projects/router/router/apu2c4/src/amd64.amd64/tmp/usr/bin >> -O2 -pipe -fno-common -DMAINEXEC=bc -DNLSPATH=/usr/share/nls/%L/%N.cat >> -DBUILD_TYPE=A >> -DBC_DEFAULT_BANNER=0 -DBC_DEFAULT_PROMPT=0 -DBC_DEFAULT_SIGINT_RESET >> -DBC_DEFAULT_TTY_MODE >> -DBC_ENABLED -DBC_ENABLE_EDITLINE -DBC_ENABLE_EXTRA_MATH >> -DBC_ENABLE_LIBRARY=0 >> -DBC_ENABLE_LONG_OPTIONS -DBC_ENABLE_HISTORY -DBC_ENABLE_PROMPT >> -DBC_ENABLE_RAND >> -DDC_DEFAULT_PROMPT=0 -DDC_DEFAULT_SIGINT_RESET -DDC_DEFAULT_TTY_MODE=0 >> -DDC_ENABLED -DNDEBUG >> -I/pool/home/ohartmann/Projects/router/router/apu2c4/src/contrib/bc/include >> -DBC_ENABLE_NLS=1 >> -flto -DNDEBUG -fPIE -mretpoline -ftrivial-auto-var-init=zero >> -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang >> -std=gnu99 >> -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Wall >> -Wno-format-y2k -W >> -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes >> -Wpointer-arith -Wreturn-type >> -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter >> -Wcast-align >> -Wchar-subscripts -Wnested-externs -Wold-style-definition >> -Wno-pointer-sign >> -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body >> -Wno-string-plus-int >> -Wno-unused-const-variable -Wno-error=unused-but-set-variable >> -Qunused-arguments -Wl,-zrelro >> -pie -Wl,-zretpolineplt -o gh-bc args.o bc.o bc_lex.o bc_parse.o data.o >> dc.o dc_lex.o >> dc_parse.o file.o history.o lang.o lex.o main.o num.o opt.o parse.o >> program.o rand.o read.o >> vector.o vm.o bc_help.o dc_help.o lib.o lib2.o -ledit ld: error: >> args.o: >> Opaque pointers are >> only supported in -opaque-pointers mode (Producer: 'LLVM15.0.7' Reader: >> 'LLVM 14.0.5') cc: >> error: linker command failed with exit code 1 (use -v to see invocation) >> *** >> [gh-bc] Error >> code 1 >> >> make[5]: stopped in >> /pool/home/ohartmann/Projects/router/router/apu2c4/src/usr.bin/gh-bc >> [...] >> >> >> I'm now out of options here :-( >> > > are you even using the dev/an driver? > > you should probably just remove it from the kernel (and any other > driver of the sort) > > ultimately you should be able to stick to the compiler from main. in > the worst case the commit to turn "function definition without a > prototype is deprecated" from errors to warnings could be merged to > stable/13 to facilitate the build > > it may be you will be able to get away with modifying CFLAGS like so: > CFLAGS+=-Wno-deprecated-non-prototype > > in src.conf and/or make.conf > So I looked into it and landed https://cgit.FreeBSD.org/src/commit/?id=82eb549f800e08158802b74bef62e7db0939a3fe As of that commit I can both buildworld and buildkernel a stable/13 tree while running main, without any magic to change compilers. -- Mateusz Guzik