You are not logged in.

#1 2024-05-11 18:38:49

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

[SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

Hi all,

I am trying to build fvwm from AUR, but it won't build.

I do not see an error that I can look up or try to solve. Could you please help and point me in the right direction?

$ makepkg -s
==> Making package: fvwm 2.7.0-2 (Sat 11 May 2024 20:35:30)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found fvwm-2.7.0.tar.gz
  -> Found fvwm.desktop
==> Validating source files with sha256sums...
    fvwm-2.7.0.tar.gz ... Passed
    fvwm.desktop ... Passed
==> Extracting sources...
  -> Extracting fvwm-2.7.0.tar.gz with bsdtar
==> Starting build()...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for sed... sed
checking for python3... /usr/bin/python3
checking for perl... /usr/bin/perl
checking for perl 5.004 or better... yes
assuming /usr/bin/perl as perl location
checking whether to enable command logging... no
checking whether to enable debugging messages... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking imagepath... /usr/include/X11/bitmaps:/usr/include/X11/pixmaps
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for sys/time.h... yes
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
configure: error: "
configure is not able to compile programs with warnings.  Please
remove all offending options like -Werror from the CFLAGS and
CPPFLAGS variables and run configure again."
==> ERROR: A failure occurred in build().
    Aborting...

I tried to build both with just "makepkg -s", as well as in a chroot (aur-utils, as well as "extra-x86_64-build").

After reading the error message, I ran "./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library --enable-mandoc" in the src directory, which failed at the same spot, it seems.

Then I tried with "./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library --enable-mandoc CFLAGS="" CPPFLAGS="" ", thinking that this would knock out all the CFLAGS and CPPFLAGS from "/etc/makepkg.conf"; but this also failed.

I previously had this package built fine on my system, so perhaps a recent "gcc" upgrade caused this (please forgive my ignorance if this is not at all related. I know very little about building software).

Thank you for your time and assistance!

Last edited by lquidfire (2024-05-12 18:30:28)

Offline

#2 2024-05-11 19:01:25

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

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

From config.log

configure:7655: gcc -c -Wall -Wno-implicit-int -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Werror=format-security -g -ffile-prefix-map=/build/fvwm/src=/usr/src/debug/fvwm -flto=auto  conftest.c >&5
conftest.c: In function 'main':
conftest.c:48:18: error: assignment to 'int *' from 'char' makes pointer from integer without a cast [-Wint-conversion]
   48 |   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
      |                  ^
conftest.c:48:14: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   48 |   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
      |              ^
conftest.c:48:18: warning: operation on 'p' may be undefined [-Wsequence-point]
   48 |   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
      |                ~~^~~~
conftest.c:48:43: warning: unknown conversion type character 'Q' in format [-Wformat=]
   48 |   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
      |                                           ^
conftest.c:48:41: warning: too many arguments for format [-Wformat-extra-args]
   48 |   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
      |                                         ^~~~
conftest.c:49:6: error: assignment to 'char' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   49 |   *c = &i; c = p;
      |      ^
conftest.c:49:14: error: assignment to 'char *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   49 |   *c = &i; c = p;
      |              ^
conftest.c:47:15: warning: unused variable 'j' [-Wunused-variable]
   47 | int i; static j; int *p; char *c;
      |               ^
configure:7655: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fvwm"
| #define PACKAGE_TARNAME "fvwm"
| #define PACKAGE_VERSION "2.7.0"
| #define PACKAGE_STRING "fvwm 2.7.0"
| #define PACKAGE_BUGREPORT "fvwm-workers@fvwm.org"
| #define PACKAGE_URL ""
| #define PACKAGE "fvwm"
| #define VERSION "2.7.0"
| #define VERSIONINFO ""
| #define FVWM_CONFIG "config"
| #define FVWM2RC ".fvwm2rc"
| #define FVWM_IMAGEPATH "/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_SYS_TIME_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main (void)
| {
| int i; static j; int *p; char *c;
|   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
|   *c = &i; c = p;
|   while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
| 
|   ;
|   return 0;
| }
configure:7659: error: "
configure is not able to compile programs with warnings.  Please
remove all offending options like -Werror from the CFLAGS and
CPPFLAGS variables and run configure again."

What if you stop int-conversion and incompatible-pointer-types being treated as errors by gcc 14?

CFLAGS="$CFLAGS -Wno-error=int-conversion -Wno-error=incompatible-pointer-types" ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library --enable-mandoc

Offline

#3 2024-05-12 12:11:31

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

That worked, thank you, loqs!

1) Should those CFLAGS be added to the PKGBUILD (in the same way that you ran the command)?

build() {
  cd ${pkgname}-${pkgver}
  CFLAGS="$CFLAGS -Wno-error=int-conversion -Wno-error=incompatible-pointer-types" ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library --enable-mandoc
  make
}

2) Should those errors (and warnings?) be reported upstream? fvwm2 has been superseded by a new version, but still?

____

As an aside: Thank you for pointing out (indirectly) the config.log file. I didn't see it there and only was aware of the build log file. Also looked up the errors on the Porting to gcc14 page, very interesting and happy to learn!

Last edited by lquidfire (2024-05-12 12:18:13)

Offline

#4 2024-05-12 13:46:57

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

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

lquidfire wrote:

2) Should those errors (and warnings?) be reported upstream? fvwm2 has been superseded by a new version, but still?

It already has in https://github.com/fvwmorg/fvwm/pull/100.

Offline

#5 2024-05-12 18:02:41

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

Thank you, clear.

What about 1) ? I am the package current maintainer for fvwm on AUR, so would be happy to know if adding those CFLAGS would be advisable, seeing that the PR on github is from Nov 2022 and possibly won't be merged.

On the one hand, bypassing error messages seems wrong. On the other hand: Without doing so, and uncertain upstream support, the package won't build. That would indicate that these flags should be added to the AUR PKGBUILD. What do you advice?

Offline

#6 2024-05-12 18:13:04

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

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

I think it is a matter of personal preference for the package maintainer with no clearly right choice.  Which do you prefer or think would be more maintainable between using some or all of the PR which seems unlikely to be merged and changing CFLAGS so int-conversion incompatible-pointer-types are not treated as errors by gcc 14?

Offline

#7 2024-05-12 18:29:49

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

That is an interesting question. The thought of using PR's had not occurred to me, since there already is an FVWM-git package in the AUR. I will give it some thought (and happy to get input). , but for now I will just push a new PKGBUILD with the CFLAGS that will at least allow building this package.

I made patches from the github source mentioned by loqs, and modified the PKGBUILD accordingly.

Last edited by lquidfire (2024-05-13 07:14:20)

Offline

#8 2024-05-17 15:22:03

ThomasAdam
Member
From: Southampton, England
Registered: 2005-10-26
Posts: 149

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

Hi,

Just out of interest, is there some reason you're using fvwm2, and not fvwm3?

Offline

#9 2024-05-20 14:22:45

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 74

Re: [SOLVED] AUR fvwm - GCC 14.1 causes configure error and prevents build

Hi ThomasAdam,

I am actually not using Fvwm2, but I adopted the package to keep it available for whomsoever wants to use it. And, not unimportant, to gain some packaging experience.

Thank you for your work on Fvwm3!

Offline

Board footer

Powered by FluxBB