You are not logged in.

#1 2024-06-12 19:02:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,551

setserial build problem

I am trying to build setserial, but the system complains that gcc cannot create executables.  It can.

Am I missing something:

ewaller@labbench/~/devel/build/setserial[1]% makepkg                                                                                                             [git][setserial/.][masterU]
==> Making package: setserial 2.17-5 (Wed 12 Jun 2024 11:50:58 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found setserial-2.17.tar.gz
  -> Found setserial.patch
  -> Found ioctls.patch
==> Validating source files with md5sums...
    setserial-2.17.tar.gz ... Passed
    setserial.patch ... Passed
    ioctls.patch ... Passed
==> Extracting sources...
  -> Extracting setserial-2.17.tar.gz with bsdtar
==> Starting prepare()...
patching file Makefile.in
patching file setserial.c
==> Removing existing $pkgdir/ directory...
==> Starting build()...
loading cache ./config.cache
Generating configuration file for setserial version 2.17
Release date is January, 2000
checking for gcc... gcc
checking whether the C compiler (gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/ewaller/devel/build/setserial/src=/usr/src/debug/setserial -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
==> ERROR: A failure occurred in build().
    Aborting...
ewaller@labbench/~/devel/build/setserial[4]% gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/ewaller/devel/build/setserial/src=/usr/src/debug/setserial -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../lib/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
ewaller@labbench/~/devel/build/setserial[1]% ld                                                                                                                  [git][setserial/.][masterU]
ld: no input files
ewaller@labbench/~/devel/build/setserial[1]% grep main src/setserial-2.17/setserial.c                                                                            [git][setserial/.][masterU]
main(int argc, char **argv)
ewaller@labbench/~/devel/build/setserial%              

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#2 2024-06-12 20:19:57

loqs
Member
Registered: 2014-03-06
Posts: 18,730

Re: setserial build problem

Use `autoreconf -vfi` or https://src.fedoraproject.org/rpms/sets … -c99.patch to fix the initial build failure in configure. Then https://src.fedoraproject.org/rpms/sets … -c99.patch to fix a later build failure.

Offline

Board footer

Powered by FluxBB