Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Encountered a build error: "unrecognized command-line option '-Wp'" on Fedora 37

Abierto
#394 3 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
c
Área
build-system

Línea de trabajo

Reproduce el fallo con ./autogen.sh, ./configure y make; después, inspecciona los Makefiles generados que se indican en el informe en busca del indicador -Wp,-Wp duplicado. Rastrea la configuración de compilación relevante que produce esos indicadores. Se considera terminado cuando Fedora 37 se compila correctamente sin editar manualmente los Makefiles generados.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hacktoberfest help wanted

Describe the bug
When I was building LTFS on Fedora 37, I encountered a build error: unrecognized command-line option '-Wp'.

To Reproduce
Run the build command:

./autogen.sh
./configure
make

Then gcc complained:

cc1: error: unrecognized command-line option '-Wp'

in verbose:

/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -D_GNU_SOURCE -I../../src -DLTFS_CONFIG_FILE='"/usr/local/etc/ltfs.conf"' -DLTFS_BASE_DIR='"NONE"' -DUSE_NEW_LOCKING  -D USE_UNORM2  -D USE_UNORM2 -I ..  -Wall -Wsign-compare -fsigned-char -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 -I/usr/include/uuid -I/usr/include/libxml2 -D ENABLE_SNMP -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIE -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I. -I/usr/include -fkeep-inline-functions -rdynamic -g -O2 -D_FORTIFY_SOURCE=0 -O0 -ggdb -MT libltfs_la-ltfs.lo -MD -MP -MF .deps/libltfs_la-ltfs.Tpo -c -o libltfs_la-ltfs.lo `test -f 'ltfs.c' || echo './'`ltfs.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -I../../src -DLTFS_CONFIG_FILE=\"/usr/local/etc/ltfs.conf\" -DLTFS_BASE_DIR=\"NONE\" -DUSE_NEW_LOCKING -D USE_UNORM2 -D USE_UNORM2 -I .. -Wall -Wsign-compare -fsigned-char -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 -I/usr/include/uuid -I/usr/include/libxml2 -D ENABLE_SNMP -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I. -I/usr/include -fkeep-inline-functions -rdynamic -g -O2 -D_FORTIFY_SOURCE=0 -O0 -ggdb -MT libltfs_la-ltfs.lo -MD -MP -MF .deps/libltfs_la-ltfs.Tpo -c ltfs.c  -fPIC -DPIC -o .libs/libltfs_la-ltfs.o
cc1: error: unrecognized command-line option '-Wp'
cc1: error: unrecognized command-line option '-Wp'
cc1: error: unrecognized command-line option '-Wp'

Then I checked the Makefile and found an option:

-Wp,-Wp,-D_GLIBCXX_ASSERTIONS

There seems to be a redundant "-Wp", so I ran the command:

sed -i 's/-Wp,-Wp/-Wp/g' src/libltfs/Makefile \
    src/iosched/Makefile \
    src/utils/Makefile \
    src/kmi/Makefile \
    src/Makefile \
    src/tape_drivers/linux/sg/Makefile \
    src/tape_drivers/generic/itdtimg/Makefile \
    src/tape_drivers/generic/file/Makefile

Then I ran the build command again:

make

Then, LTFS was built successfully!

Desktop:
My Fedora, GCC, autoconf and automake versions:

$ uname -a
Linux fedora 6.2.9-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 30 22:31:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Copyright © 2022 Free Software Foundation, Inc.
$ autoconf --version
autoconf (GNU Autoconf) 2.71
$ automake --version
automake (GNU automake) 1.16.5

LTFS source code version(commit hash): f95a9a4463a0e3dbb0b69aa57324a78e4eb80322

Additional context
Given that the Makefile was generated by autotools, the real cause of the problem may be related to autotools configurations. Could you do a check? Thanks in advance!
I am very interested in how it happened.

Lenguaje dominante
C
Estrellas
358
Forks
111
Merge medio
5 d 1 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LinearTapeFileSystem/ltfs

Todos los issues de LinearTapeFileSystem/ltfs

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.