From nobody Sat Nov 26 15:10:58 2022 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 4NKFYD2hbgz4hLHT for ; Sat, 26 Nov 2022 15:10:56 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (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 4NKFYC0Ty4z3nJT for ; Sat, 26 Nov 2022 15:10:55 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="AYjQwAZ/"; spf=pass (mx1.freebsd.org: domain of archimedes.gaviola@gmail.com designates 2607:f8b0:4864:20::1132 as permitted sender) smtp.mailfrom=archimedes.gaviola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-3b48b139b46so65996907b3.12 for ; Sat, 26 Nov 2022 07:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=KMEb8xwC8lBkHw1w1BGp0ssghzMbl/lfGSZ75w5UZaA=; b=AYjQwAZ/unq34vUjpBC0B4WHgSVUrEh4ZaGv1DYp/1nPiZhTGk9MN9raAO9oGKvqUi VbkZumyUEcyeByFatKcpYIvOaNRS5eRzy/ZGCK3wXPCd3bNkxYEj86gcrjJyeKUEioDO j4qieZ9ut80Jhgmpfpg9Lr0L6B6mquikKWm6t7BD/4ht3f2Fw42LfhlJNr3D/FhZzl+U cMOjm7070jQNJ8+cS6gudqUkM12lmPx5piIZ64+alieEXKQ8EFUZyViAR6nsvSxsT0Xf YA6l+tgt3bRpIHcdpkIDPcp0nsPSJI06U5Ol4uR7qOOTH4TVCWVjIQKQ74vSF3Eq+czh upMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KMEb8xwC8lBkHw1w1BGp0ssghzMbl/lfGSZ75w5UZaA=; b=ujiSSVE4mhkYRPWDJ/cHG0dP2OXVOeqyeiOeHI9RLrKC65MwL/EFxX1vkPKA7FMe4A TGe8Eyzl9O2QKlD7G2XNsKKoxTnofnJpdBU2UShnSzwSgoEZaed4JYZx0UbVtu682w98 hNzYMEaTrPytoVqp99jFCn0tSnSl46VDxO7zo3v7Z3xPWYtzzlZwxDkiXzJ1PFef1XQp N9lLXlIqeEHFpK+F+qbTpE3C3esP6p89moHHNN0T0kL+n9j4Nw2SOBJBIL3CbNXGTobC b3bsX9aVwqjEKXyHL4VwXAD2OucQ5V+u6/szQ3SLd3aKzRQXtLhAgNDidvwGqjNo1us9 c03w== X-Gm-Message-State: ANoB5pmmTf9cE7UUHDT78J7/Msyowcd2EDMDxGNjrhWkSiN7FrO2eU5g Yc3N9ur3S1utwx4FFZXvgP7inUoFFRE+gddqQzStR878SQg= X-Google-Smtp-Source: AA0mqf7dNkJQonkzwAfPn+KpwMEhDmGP/Cp1hNXQnWE4VdQvVqQhpUhHsgN32USdKhk1AbsMaJc9XHCc3yroPZOTGTg= X-Received: by 2002:a05:690c:285:b0:3ab:189e:3465 with SMTP id bf5-20020a05690c028500b003ab189e3465mr20668718ywb.343.1669475453432; Sat, 26 Nov 2022 07:10:53 -0800 (PST) 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 From: Archimedes Gaviola Date: Sat, 26 Nov 2022 23:10:58 +0800 Message-ID: Subject: ld error (undefined symbol) while compiling sqlite3 To: freebsd-current Content-Type: multipart/alternative; boundary="0000000000005cf70e05ee610bad" X-Spamd-Result: default: False [-2.62 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_SPAM_SHORT(0.38)[0.377]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1132:from]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TAGGED_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4NKFYC0Ty4z3nJT X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --0000000000005cf70e05ee610bad Content-Type: text/plain; charset="UTF-8" Hi, For some reason, I am compiling sqlite3 from the /usr/src/contrib/sqlite3 source using FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20221027-769b884e2e2-258837. I created a /usr/src/usr.bin/sqlite3 directory and created a Makefile file with content referred to the source. root@generic:/usr/src/usr.bin/sqlite3 # ls -la total 16 drwxr-xr-x 2 root wheel 512 Nov 26 12:46 . drwxr-xr-x 279 root wheel 5120 Nov 26 12:46 .. -rw-r--r-- 1 root wheel 295 Nov 26 16:50 Makefile root@generic:/usr/src/usr.bin/sqlite3 # cat Makefile # $FreeBSD$ .include SQLITE= ${SRCTOP}/contrib/sqlite3 .PATH: ${SQLITE} PROG= sqlite3 MK_MAN=no SRCS= sqlite3.c INCS= shell.c sqlite3.h WARNS?= 3 CFLAGS+= -I${SQLITE} \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_OMIT_LOAD_EXTENSION .include With 'make' command invoked, I encountered this error -> ld: error: undefined symbol: main as referenced to the crt1_c.c:72 (/usr/src/lib/csu/aarch64/crt1_c.c:72) file. See below details for the actual error. root@generic:/usr/src/usr.bin/sqlite3 # make cc -O2 -pipe -fno-common -I/usr/src/contrib/sqlite3 -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION -fPIE -g -gz=zlib -MD -MF.depend.sqlite3.o -MTsqlite3.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -c /usr/src/contrib/sqlite3/sqlite3.c -o sqlite3.o cc -O2 -pipe -fno-common -I/usr/src/contrib/sqlite3 -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION -fPIE -g -gz=zlib -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -Wl,-zrelro -pie -o sqlite3.full sqlite3.o -L/usr/obj/usr/src/arm64.aarch64/lib/libthr -lpthread ld: error: undefined symbol: main >>> referenced by crt1_c.c:72 (/usr/src/lib/csu/aarch64/crt1_c.c:72) >>> /usr/lib/Scrt1.o:(__start) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make: stopped in /usr/src/usr.bin/sqlite3 Not sure if I missed something or if something goes wrong with my Makefile content construction. I basically followed here https://www.sqlite.org/howtocompile.html and then proved the source to compile successfully. root@generic:/usr/src/contrib/sqlite3 # pwd /usr/src/contrib/sqlite3 root@generic:/usr/src/contrib/sqlite3 # ls -lah total 11364 drwxr-xr-x 3 root wheel 1.0K Oct 27 08:06 . drwxr-xr-x 89 root wheel 2.0K Nov 26 13:01 .. -rw-r--r-- 1 root wheel 15K Oct 27 08:06 INSTALL -rw-r--r-- 1 root wheel 729B Oct 27 08:06 Makefile.am -rw-r--r-- 1 root wheel 547B Oct 27 08:06 Makefile.fallback -rw-r--r-- 1 root wheel 37K Oct 27 08:06 Makefile.in -rw-r--r-- 1 root wheel 28K Oct 27 08:06 Makefile.msc -rw-r--r-- 1 root wheel 3.5K Oct 27 08:06 README.txt -rw-r--r-- 1 root wheel 7.1K Oct 27 08:06 Replace.cs -rw-r--r-- 1 root wheel 365K Oct 27 08:06 aclocal.m4 -rwxr-xr-x 1 root wheel 7.2K Oct 27 08:06 compile -rwxr-xr-x 1 root wheel 48K Oct 27 08:06 config.guess -rwxr-xr-x 1 root wheel 35K Oct 27 08:06 config.sub -rwxr-xr-x 1 root wheel 485K Oct 27 08:06 configure -rw-r--r-- 1 root wheel 8.5K Oct 27 08:06 configure.ac -rwxr-xr-x 1 root wheel 23K Oct 27 08:06 depcomp -rwxr-xr-x 1 root wheel 15K Oct 27 08:06 install-sh -rwxr-xr-x 1 root wheel 320K Oct 27 08:06 ltmain.sh -rwxr-xr-x 1 root wheel 6.7K Oct 27 08:06 missing -rw-r--r-- 1 root wheel 717K Oct 27 08:06 shell.c -rw-r--r-- 1 root wheel 8.7K Oct 27 08:06 sqlite3.1 -rw-r--r-- 1 root wheel 8.2M Oct 27 08:06 sqlite3.c -rw-r--r-- 1 root wheel 599K Oct 27 08:06 sqlite3.h -rw-r--r-- 1 root wheel 267B Oct 27 08:06 sqlite3.pc.in -rw-r--r-- 1 root wheel 1.9K Oct 27 08:06 sqlite3.rc -rw-r--r-- 1 root wheel 36K Oct 27 08:06 sqlite3ext.h -rw-r--r-- 1 root wheel 78B Oct 27 08:06 sqlite3rc.h drwxr-xr-x 6 root wheel 512B Oct 27 08:06 tea root@generic:/usr/src/contrib/sqlite3 # cc -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION shell.c sqlite3.c -o sqlite3 So, the above compilation builds the source successfully. This time I've manually invoked the first compilation command and it works just fine as seen below. root@generic:/usr/src/contrib/sqlite3 # cc -O2 -pipe -fno-common -I/usr/src/contrib/sqlite3 -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -fPIE -g -gz=zlib -MD -MF.depend.sqlite3.o -MTsqlite3.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -c /usr/src/contrib/sqlite3/sqlite3.c -o sqlite3.o While the second compilation command below breaks having the same manifested error. cc -O2 -pipe -fno-common -I/usr/src/contrib/sqlite3 -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION -fPIE -g -gz=zlib -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -Wl,-zrelro -pie -o sqlite3.full sqlite3.o -L/usr/obj/usr/src/arm64.aarch64/lib/libthr -lpthread ld: error: undefined symbol: main >>> referenced by crt1_c.c:72 (/usr/src/lib/csu/aarch64/crt1_c.c:72) >>> /usr/lib/Scrt1.o:(__start) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make: stopped in /usr/src/usr.bin/sqlite3 Any idea of this problem? I posted this at freebsd-database ML however, I'm thinking that the problem might not be related to SQLite3 perspective as I have compiled the source without any problem at all so, I share it here. Thanks and best regards, Archimedes --0000000000005cf70e05ee610bad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

For some reason, I am co= mpiling sqlite3 from the /usr/src/contrib/sqlite3 source using FreeBSD-14.0= -CURRENT-arm64-aarch64-RPI-20221027-769b884e2e2-258837. I created a /usr/sr= c/usr.bin/sqlite3 directory and created a Makefile file with content referr= ed to the source.

root@generic:/usr/src/usr.bi= n/sqlite3 # ls -la
total 16
drwxr-xr-x =C2=A0 =C2=A02 root =C2=A0whee= l =C2=A0 512 Nov 26 12:46 .
drwxr-xr-x =C2=A0279 root =C2=A0wheel =C2=A0= 5120 Nov 26 12:46 ..
-rw-r--r-- =C2=A0 =C2=A01 root =C2=A0wheel =C2=A0 2= 95 Nov 26 16:50 Makefile

root@generic:/usr/src/usr.bin/sqlite3 # cat= Makefile
# $FreeBSD$

.include <src.opts.mk>

SQLITE=3D ${SRCTOP}/contrib/sqlite3
.PATH: = =C2=A0${SQLITE}

PROG=3D sqlite3
MK_MAN=3Dno
SRCS=3D sqlite3.c<= br>INCS=3D shell.c sqlite3.h

WARNS?=3D 3
CFLAGS+=3D =C2=A0 =C2=A0= =C2=A0 =C2=A0-I${SQLITE} \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 -DSQLITE_THREADSAFE=3D0 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 -DSQLITE_OMIT_LOAD_EXTENSION

.include <<= a href=3D"http://bsd.prog.mk">bsd.prog.mk>

= With 'make' command invoked, I encountered this error -> ld: err= or: undefined symbol: main as referenced to the crt1_c.c:72
(/usr/src/li= b/csu/aarch64/crt1_c.c:72) file. See below details for the actual error.
root@generic:/usr/src/usr.bin/sqlite3 # make
cc =C2=A0-O2 -pipe -fn= o-common -I/usr/src/contrib/sqlite3 =C2=A0-DSQLITE_THREADSAFE=3D1
=C2=A0= -DSQLITE_OMIT_LOAD_EXTENSION =C2=A0 -fPIE -g -gz=3Dzlib -MD =C2=A0-MF.depen= d.sqlite3.o
-MTsqlite3.o -std=3Dgnu99 -Wno-format-zero-length -fstack-pr= otector-strong
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-un= used-parameter
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith = -Wno-uninitialized
-Wno-pointer-sign -Wno-empty-body -Wno-string-plus-in= t
-Wno-unused-const-variable -Wno-error=3Dunused-but-set-variable
-Wn= o-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-= unused-function -Wno-enum-conversion -Wno-unused-local-typedef
-Wno-addr= ess-of-packed-member =C2=A0-Qunused-arguments =C2=A0 =C2=A0-c
/usr/src/c= ontrib/sqlite3/sqlite3.c -o sqlite3.o
cc -O2 -pipe -fno-common -I/usr/sr= c/contrib/sqlite3 -DSQLITE_THREADSAFE=3D1
-DSQLITE_OMIT_LOAD_EXTENSION -= fPIE -g -gz=3Dzlib -std=3Dgnu99
-Wno-format-zero-length -fstack-protecto= r-strong -Wsystem-headers -Werror
-Wall -Wno-format-y2k -W -Wno-unused-p= arameter -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wno-u= ninitialized -Wno-pointer-sign
-Wno-empty-body -Wno-string-plus-int -Wno= -unused-const-variable
-Wno-error=3Dunused-but-set-variable -Wno-tautolo= gical-compare
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-fu= nction
-Wno-enum-conversion -Wno-unused-local-typedef
-Wno-address-of= -packed-member -Qunused-arguments =C2=A0-Wl,-zrelro -pie =C2=A0 -o
sqlit= e3.full sqlite3.o =C2=A0-L/usr/obj/usr/src/arm64.aarch64/lib/libthr
-lpt= hread
ld: error: undefined symbol: main
>>> referenced by cr= t1_c.c:72 (/usr/src/lib/csu/aarch64/crt1_c.c:72)
>>> =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /usr/lib/Scrt1.o:(__start)
cc: er= ror: linker command failed with exit code 1 (use -v to see invocation)
*= ** Error code 1

Stop.
make: stopped in /usr/src/usr.bin/sqlite3
Not sure if I missed something or if something goes wrong with my Mak= efile
content construction. I basically followed here
https://www.sqlite.org/howtocompile.h= tml and then proved the source to
compile successfully.
root@generic:/usr/src/contrib/sqlite3 # pwd
/usr/src/contri= b/sqlite3
root@generic:/usr/src/contrib/sqlite3 # ls -lah
total 11364=
drwxr-xr-x =C2=A0 3 root =C2=A0wheel =C2=A0 1.0K Oct 27 08:06 .
drwx= r-xr-x =C2=A089 root =C2=A0wheel =C2=A0 2.0K Nov 26 13:01 ..
-rw-r--r-- = =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A015K Oct 27 08:06 INSTALL
-rw-r--r= -- =C2=A0 1 root =C2=A0wheel =C2=A0 729B Oct 27 08:06 Makefile.am
-rw-r-= -r-- =C2=A0 1 root =C2=A0wheel =C2=A0 547B Oct 27 08:06 Makefile.fallback-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A037K Oct 27 08:06 Makefi= le.in
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A028K Oct 27 08:06= Makefile.msc
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 3.5K Oct 27 08= :06 README.txt
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 7.1K Oct 27 0= 8:06 Replace.cs
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 365K Oct 27 = 08:06 aclocal.m4
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 7.2K Oct 27= 08:06 compile
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A048K Oct= 27 08:06 config.guess
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 =C2= =A035K Oct 27 08:06 config.sub
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2= =A0 485K Oct 27 08:06 configure
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2= =A0 8.5K Oct 27 08:06 configure.ac
-= rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A023K Oct 27 08:06 depcomp-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 =C2=A015K Oct 27 08:06 instal= l-sh
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 320K Oct 27 08:06 ltmai= n.sh
-rwxr-xr-x =C2=A0 1 root =C2=A0wheel =C2=A0 6.7K Oct 27 08:06 missi= ng
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 717K Oct 27 08:06 shell.c=
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 8.7K Oct 27 08:06 sqlite3.1=
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 8.2M Oct 27 08:06 sqlite3.c=
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 599K Oct 27 08:06 sqlite3.h=
-rw-r--r-- =C2=A0 1 root =C2=A0wheel =C2=A0 267B Oct 27 08:06 sqlite3.pc.in
-rw-r--r-- =C2=A0 1 root =C2= =A0wheel =C2=A0 1.9K Oct 27 08:06 sqlite3.rc
-rw-r--r-- =C2=A0 1 root = =C2=A0wheel =C2=A0 =C2=A036K Oct 27 08:06 sqlite3ext.h
-rw-r--r-- =C2=A0= 1 root =C2=A0wheel =C2=A0 =C2=A078B Oct 27 08:06 sqlite3rc.h
drwxr-xr-x= =C2=A0 6 root =C2=A0wheel =C2=A0 512B Oct 27 08:06 tea

root@generic= :/usr/src/contrib/sqlite3 # cc -DSQLITE_THREADSAFE=3D0 -DSQLITE_OMIT_LOAD_E= XTENSION shell.c sqlite3.c -o sqlite3

So, the abov= e compilation builds the source successfully.

This time I= 've manually invoked the first compilation command and it works just fi= ne as seen below.

root@generic:/usr/src/contrib/sqlite3 # cc =C2=A0-= O2 -pipe -fno-common
-I/usr/src/contrib/sqlite3 =C2=A0-DSQLITE_THREADSAF= E=3D0
=C2=A0-DSQLITE_OMIT_LOAD_EXTENSION -fPIE -g -gz=3Dzlib -MD =C2=A0-= MF.depend.sqlite3.o
-MTsqlite3.o -std=3Dgnu99 -Wno-format-zero-length -f= stack-protector-strong
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W= -Wno-unused-parameter
-Wstrict-prototypes -Wmissing-prototypes -Wpointe= r-arith -Wno-uninitialized
-Wno-pointer-sign -Wno-empty-body -Wno-string= -plus-int
-Wno-unused-const-variable -Wno-error=3Dunused-but-set-variabl= e
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality<= br>-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
-= Wno-address-of-packed-member =C2=A0-Qunused-arguments -c
/usr/src/contri= b/sqlite3/sqlite3.c -o sqlite3.o

While the second compilation comman= d below breaks having the same manifested error.

cc -O2 -pipe -fno-c= ommon -I/usr/src/contrib/sqlite3 -DSQLITE_THREADSAFE=3D1
-DSQLITE_OMIT_L= OAD_EXTENSION -fPIE -g -gz=3Dzlib -std=3Dgnu99
-Wno-format-zero-length -= fstack-protector-strong -Wsystem-headers -Werror
-Wall -Wno-format-y2k -= W -Wno-unused-parameter -Wstrict-prototypes
-Wmissing-prototypes -Wpoint= er-arith -Wno-uninitialized -Wno-pointer-sign
-Wno-empty-body -Wno-strin= g-plus-int -Wno-unused-const-variable
-Wno-error=3Dunused-but-set-variab= le -Wno-tautological-compare
-Wno-unused-value -Wno-parentheses-equality= -Wno-unused-function
-Wno-enum-conversion -Wno-unused-local-typedef
= -Wno-address-of-packed-member -Qunused-arguments =C2=A0-Wl,-zrelro -pie =C2= =A0 -o
sqlite3.full sqlite3.o =C2=A0-L/usr/obj/usr/src/arm64.aarch64/lib= /libthr
-lpthread
ld: error: undefined symbol: main
>>> r= eferenced by crt1_c.c:72 (/usr/src/lib/csu/aarch64/crt1_c.c:72)
>>= > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /usr/lib/Scrt1.o:(__s= tart)
cc: error: linker command failed with exit code 1 (use -v to see i= nvocation)
*** Error code 1

Stop.
make: stopped in /usr/src/us= r.bin/sqlite3

Any idea of this problem? I posted t= his at freebsd-database ML however, I'm thinking that the problem might= not be related to SQLite3 perspective as I have compiled the source withou= t any problem at all so, I share it here.

Than= ks and best regards,
Archimedes





--0000000000005cf70e05ee610bad--