gcc: -avoid-version vs -fno-version

Vom einfachen Programm zum fertigen Debian-Paket, Fragen rund um Programmiersprachen, Scripting und Lizenzierung.
Antworten
altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 08.07.2023 13:39:24

Hallo,

ich (=Laie) versuche gerade, https://gitlab.com/menelkir/g15stats/-/milestones zu übersetzen.

Das .configure läuft durch:

Code: Alles auswählen

root@birdie:~/work/g15stats# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
./configure: line 3764: LT_INIT: command not found
checking for ranlib... ranlib
checking for g15daemon_version in -lg15daemon_client... yes
./configure: line 3906: AC_CHECK_INCLUDES_DEFAULT: command not found
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for sys/wait.h that is POSIX.1 compatible... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking g15daemon_client.h usability... yes
checking g15daemon_client.h presence... yes
checking for g15daemon_client.h... yes
checking libg15render.h usability... yes
checking libg15render.h presence... yes
checking for libg15render.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libgtop-2.0... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Wenn ich "make" aufrufe, erhalte ich folgende Fehlermeldung:

Code: Alles auswählen

root@birdie:~/work/g15stats# make
make  all-am
make[1]: Verzeichnis „/root/work/g15stats“ wird betreten
gcc -Wall  -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I. -I. -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -avoid-version -lgtop-2.0 -lglib-2.0 -o g15stats g15stats.o  -lg15daemon_client -lg15render -lpthread -lm -lrt
gcc: error: unrecognized command-line option ‘-avoid-version’; did you mean ‘-fno-version’?
make[1]: *** [Makefile:423: g15stats] Fehler 1
make[1]: Verzeichnis „/root/work/g15stats“ wird verlassen
make: *** [Makefile:326: all] Fehler 2
Ich habe auch schon "beherzt" ins Makefile eingegriffen und -avoid-version durch -fno-version ersetzt. In dem Fall gibt es keine Fehlermeldung, es wird aber auch kein Binary erzeugt.

In dem GIT-Projekt scheint nicht so viel los zu sein und bei Tante Google findet man auch nicht viel zu den Optionen, deshalb frage ich mal hier: Hat jemand einen Tipp?

Gruß,
Jörg

chrbr
Beiträge: 550
Registriert: 29.10.2022 15:53:26

Re: gcc: -avoid-version vs -fno-version

Beitrag von chrbr » 08.07.2023 13:57:17

Wird möglicherweise eine bestimmte gcc Version vorausgesetzt?

Benutzeravatar
Livingston
Beiträge: 1454
Registriert: 04.02.2007 22:52:25
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: 127.0.0.1

Re: gcc: -avoid-version vs -fno-version

Beitrag von Livingston » 08.07.2023 14:01:55

Sieht so aus, als läge der Fehler hier:
gcc: error: unrecognized command-line option ‘-avoid-version’; did you mean ‘-fno-version’?
In der manpage des aktuellen gcc 12.2.0 habe ich keine Option -avoid-version gefunden. Der Vorschlag, diese Option durch -fno-version zu ersetzen, ist einen Versuch wert. Ansonsten kannst Du natürlich auch den Entwickler mal drauf ansprechen, er scheint ja selbst noch viel an dem Projekt zu schrauben.
Der Hauptunterschied zwischen etwas, was möglicherweise kaputtgehen könnte und etwas, was unmöglich kaputtgehen kann, besteht darin, dass sich bei allem, was unmöglich kaputtgehen kann, falls es doch kaputtgeht, normalerweise herausstellt, dass es unmöglich zerlegt oder repariert werden kann.
Douglas Adams

retabell
Beiträge: 87
Registriert: 01.07.2012 13:20:21

Re: gcc: -avoid-version vs -fno-version

Beitrag von retabell » 09.07.2023 08:03:25

altmetaller hat geschrieben: ↑ zum Beitrag ↑
08.07.2023 13:39:24
Das .configure läuft durch:

Code: Alles auswählen

root@birdie:~/work/g15stats# ./configure

./configure: line 3764: LT_INIT: command not found

./configure: line 3906: AC_CHECK_INCLUDES_DEFAULT: command not found
da scheint ja noch was zu fehlen

Code: Alles auswählen

apt install libtool

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 13:45:02

Hallo,
retabell hat geschrieben: ↑ zum Beitrag ↑
09.07.2023 08:03:25
da scheint ja noch was zu fehlen

Code: Alles auswählen

apt install libtool
Danke - genau wegen solcher Tipps frage ich hier nach :-) Hat aber leider auch nichts genützt, das Fehlerbild bleibt das Gleiche :-(

Gruß,
Jörg

Benutzeravatar
MSfree
Beiträge: 10777
Registriert: 25.09.2007 19:59:30

Re: gcc: -avoid-version vs -fno-version

Beitrag von MSfree » 12.07.2023 13:58:24

altmetaller hat geschrieben: ↑ zum Beitrag ↑
08.07.2023 13:39:24
Ich habe auch schon "beherzt" ins Makefile eingegriffen und -avoid-version durch -fno-version ersetzt. In dem Fall gibt es keine Fehlermeldung, es wird aber auch kein Binary erzeugt.
Ich hätte die Option schlicht komplett aus dem Makefile gelöscht. Diese Option scheint irgendeine provisorische Option gewesen zu sein, die nach meiner Recherche in gcc 4.4 drin war. Mittlerweile sind wir bei gcc 12, die Option gibt es nicht mehr und der Ersatzvorschlag dürfte hier nicht zutreffend sein.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 14:03:07

Hallo,

ohne die Option sieht es so aus:

Code: Alles auswählen

root@birdie:~/work/g15stats# make
make  all-am
make[1]: Verzeichnis „/root/work/g15stats“ wird betreten
gcc -Wall  -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I. -I. -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -lgtop-2.0 -lglib-2.0 -o g15stats g15stats.o  -lg15daemon_client -lg15render -lpthread -lm -lrt
/usr/bin/ld: g15stats.o: in function `init_cpu_count':
g15stats.c:(.text+0xa39): undefined reference to `glibtop_get_sysinfo'
/usr/bin/ld: g15stats.o: in function `print_sys_load_info':
g15stats.c:(.text+0x12aa): undefined reference to `glibtop_get_loadavg'
/usr/bin/ld: g15stats.c:(.text+0x12b6): undefined reference to `glibtop_get_uptime'
/usr/bin/ld: g15stats.o: in function `print_mem_info':
g15stats.c:(.text+0x140b): undefined reference to `glibtop_get_mem'
/usr/bin/ld: g15stats.o: in function `print_swap_info':
g15stats.c:(.text+0x14a5): undefined reference to `glibtop_get_swap'
/usr/bin/ld: g15stats.o: in function `draw_mem_screen':
g15stats.c:(.text+0x18ee): undefined reference to `glibtop_get_mem'
/usr/bin/ld: g15stats.o: in function `draw_swap_screen':
g15stats.c:(.text+0x1bd2): undefined reference to `glibtop_get_swap'
/usr/bin/ld: g15stats.o: in function `draw_summary_screen':
g15stats.c:(.text+0x1ef6): undefined reference to `glibtop_get_mem'
/usr/bin/ld: g15stats.c:(.text+0x240c): undefined reference to `glibtop_get_swap'
/usr/bin/ld: g15stats.o: in function `draw_cpu_screen_unicore':
g15stats.c:(.text+0x2b3c): undefined reference to `glibtop_get_cpu'
/usr/bin/ld: g15stats.o: in function `draw_cpu_screen_multicore':
g15stats.c:(.text+0x2bf2): undefined reference to `glibtop_get_cpu'
/usr/bin/ld: g15stats.o: in function `draw_net_screen':
g15stats.c:(.text+0x3fe5): undefined reference to `glibtop_get_netload'
/usr/bin/ld: g15stats.o: in function `network_watch':
g15stats.c:(.text+0x5a76): undefined reference to `glibtop_get_netload'
/usr/bin/ld: g15stats.c:(.text+0x5c85): undefined reference to `glibtop_get_netload'
/usr/bin/ld: g15stats.o: in function `main':
g15stats.c:(.text+0x6588): undefined reference to `glibtop_init'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:423: g15stats] Fehler 1
make[1]: Verzeichnis „/root/work/g15stats“ wird verlassen
make: *** [Makefile:326: all] Fehler 2
Gruß,
Jörg

Benutzeravatar
MSfree
Beiträge: 10777
Registriert: 25.09.2007 19:59:30

Re: gcc: -avoid-version vs -fno-version

Beitrag von MSfree » 12.07.2023 14:11:46

Sind Debianlibgtop2-common und Debianlibgtop2-dev instaliert?

JTH
Moderator
Beiträge: 3023
Registriert: 13.08.2008 17:01:41
Wohnort: Berlin

Re: gcc: -avoid-version vs -fno-version

Beitrag von JTH » 12.07.2023 14:12:37

Die ganzen nicht verlinkbaren Funktionen dürften aus Debianlibgtop-2.0-11 stammen.

Da das dazupassende Linkerflag
altmetaller hat geschrieben: ↑ zum Beitrag ↑
12.07.2023 14:03:07

Code: Alles auswählen

-lgtop-2.0
vorhanden ist, fehlt dir evtl. Debianlibgtop2-dev (und dessen Abhängigkeiten, die obige Bibliothek)? Das wäre die einfache Ursache.

Wenn du Pech hast, hat sich diese Bibliothek verändert und du musst den Quellcode des Programms, das du bauen willst, dahingehend anpassen. Das wäre die nicht immer – manchmal schon – so einfach zu lösende Ursache. Wenn schon das Makefile steinzeitliche Compilerflags enthält, ist diese zweite Ursache nicht ausgeschlossen.

Edit: Der Kollege ohne Microsoft war schneller :wink:
Manchmal bekannt als Just (another) Terminal Hacker.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 14:23:53

JTH hat geschrieben: ↑ zum Beitrag ↑
12.07.2023 14:12:37
fehlt dir evtl. Debianlibgtop2-dev (und dessen Abhängigkeiten,
Hallo,

Code: Alles auswählen

oot@birdie:~/work/g15stats# aptitude search libgtop
i   libgtop-2.0-11                  - Gtop, Bibliothek für Systemüberwachung (La
p   libgtop-2.0-11:i386             - Gtop, Bibliothek für Systemüberwachung (La
i   libgtop-2.0-11-dbgsym           - debug symbols for libgtop-2.0-11          
p   libgtop-2.0-11-dbgsym:i386      - debug symbols for libgtop-2.0-11          
i   libgtop2-common                 - Gtop, Bibliothek für Systemüberwachung (al
v   libgtop2-common:i386            -                                           
i   libgtop2-dev                    - gtop system monitoring library (devel)    
p   libgtop2-dev:i386               - gtop system monitoring library (devel)    
p   libgtop2-doc                    - gtop system monitoring library (documentat
root@birdie:~/work/g15stats# 
Ich habe alles sauber mit apt-get installiert; das schliesst fehlende Abhängigkeiten eigentlich aus. Im Zweifelsfall wird man ja quasi gezwungen, diese mit --fix-missing "mitzuziehen".

Der nächste Schritt wäre tatsächlich, mir einen Gitlab-Account einzurichten und den Entwickler zu fragen; aber dafür extra einen Gitlab-Account einzurichten, wäre mir ehrlich gesagt schon zu viel Aufwand für so eine "Daddelsache".

Lieben Dank für eure Tipps. Ich vermute, das Projekt ist schlichtweg "tot". Die Tastatur ist ja auch schon etwas betagter^^

Gruß,
Jörg

Benutzeravatar
MSfree
Beiträge: 10777
Registriert: 25.09.2007 19:59:30

Re: gcc: -avoid-version vs -fno-version

Beitrag von MSfree » 12.07.2023 14:34:50

Configure ist eigentlich nicht gut auf inkrementelle Fehlerbeeseitigung ausgelegt. Wenn alles vorausgesetzte da ist, funktioniert das gut. Wenn aber etwas fehlt, das man nachinstalliert, ist inkrementelles configure nicht ideal. Es gibt in dem Verzeichnis, in dem du configure startest, eine Zustandsdatei für configure (keine Ahnung mehr, wie die heißt). Am besten, du suchst die mit ls -lart. Wenn du die Zustandsdatei löschst, fängt configure von vorne an.

Ich würde das jetzt nochmal so von vorn probieren.

Ansonsten hast du recht, das Projekt sieht ziemlich verwaist aus. Die letzte Änderung war vor 11 Monaten. Aber das Anlegen eine Kontos bei Gitlab ist jetzt nicht so aufwändig.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 14:47:02

Hallo,

das läuft zumindest schon mal auf andere Fehlermeldungen hinaus :-) Ich habe das Verzeichnis gelöscht, alles jungfräulich per GIT gezogen und noch einmal "angefangen".

Hier das ./configure:

Code: Alles auswählen

root@birdie:~/work/g15stats# ./configure
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 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 whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
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 dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking for g15daemon_version in -lg15daemon_client... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for g15daemon_client.h... yes
checking for libg15render.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTOP... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@birdie:~/work/g15stats#
Hier das make

Code: Alles auswählen

make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/root/work/g15stats/config/missing' aclocal-1.16 
 cd . && /bin/bash /root/work/g15stats/config/missing automake-1.16 --gnu
configure.ac:7: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:7: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/root/work/g15stats/config/missing' autoconf
configure.ac:15: error: possibly undefined macro: AC_CHECK_INCLUDES_DEFAULT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
make: *** [Makefile:400: configure] Fehler 1
root@birdie:~/work/g15stats#
autoconf ist installiert:

Code: Alles auswählen

oot@birdie:~/work/g15stats# aptitude search autoconf
i A autoconf                        - Erstellt automatisch configure-Skripte    
v   autoconf:i386                   -                                           
p   autoconf-archive                - Makro-Archiv für Autoconf                 
p   autoconf-dickey                 - automatic configure script builder (Thomas
p   autoconf-doc                    - automatic configure script builder documen
v   autoconf-gl-macros              -                                           
p   autoconf2.13                    - automatic configure script builder (obsole
p   autoconf2.64                    - Automatische Erzeugung von »configure«-Skr
p   autoconf2.69                    - automatic configure script builder (obsole
p   libconfig-autoconf-perl         - Perl module to implement some of AutoConf'
v   librust-clicolors-control+termi -                                           
v   librust-clicolors-control+termi -                                           
v   librust-clicolors-control-1+ter -                                           
v   librust-clicolors-control-1+ter -                                           
v   librust-clicolors-control-1.0+t -                                           
v   librust-clicolors-control-1.0+t -                                           
v   librust-clicolors-control-1.0.1 -                                           
v   librust-clicolors-control-1.0.1 -                                           
p   php-horde-mail-autoconfig       - Horde Mail Autoconfiguration              
root@birdie:~/work/g15stats#
Also, nicht, dass wir uns falsch verstehen: Ich habe keine Ahnung, was autoconf ist, was make und ./configure macht usw. - ich wackle lediglich ohne jegliche Programmierkenntnisse dem README hinterher weil ich gerne das Binary hätte.

Sieht nicht gut aus, oder? :-(

Gruß,
Jörg

JTH
Moderator
Beiträge: 3023
Registriert: 13.08.2008 17:01:41
Wohnort: Berlin

Re: gcc: -avoid-version vs -fno-version

Beitrag von JTH » 12.07.2023 14:53:01

Ich habs mal fix ausprobiert: Nachdem ein paar fehlende Anhängigkeiten (die oben erwähnten) installiert waren, war

Code: Alles auswählen

libtool: Version mismatch error.  This is libtool 2.4.6.42-b88ce-dirty, but the
libtool: definition of this LT_INIT comes from libtool 2.4.7.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6.42-b88ce-dirty
libtool: and run autoconf again.
make[1]: *** [Makefile:472: g15stats] Error 63
make[1]: Leaving directory '/tmp/tmp.mI06o00fsI/g15stats'
make: *** [Makefile:368: all] Error 2
bei mir der übrigbleibende Fehlschlag.

Von libtool, autotools etc. hab ich nur (noch) oberflächlig Ahnung. Ein flinkes

Code: Alles auswählen

aclocal -I ./config/
autoreconf --force --install
./configure
make
hat das Programm g15stats dann zumindest aber ohne weitere Mucken gebaut.

altmetaller hat geschrieben: ↑ zum Beitrag ↑
12.07.2023 14:47:02
autoconf ist installiert:
Debianautomake auch?
Manchmal bekannt als Just (another) Terminal Hacker.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 15:02:43

Hallo,

Code: Alles auswählen

root@birdie:~/work# git clone https://gitlab.com/menelkir/g15stats
Klone nach 'g15stats' ...
warning: Umleitung nach https://gitlab.com/menelkir/g15stats.git/
remote: Enumerating objects: 230, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 230 (delta 14), reused 8 (delta 2), pack-reused 177
Empfange Objekte: 100% (230/230), 488.70 KiB | 8.01 MiB/s, fertig.
Löse Unterschiede auf: 100% (77/77), fertig.

Code: Alles auswählen

root@birdie:~/work# cd g15stats/
root@birdie:~/work/g15stats# aclocal -I ./config/
root@birdie:~/work/g15stats# autoreconf --force --install
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: 'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT'
configure.ac:15: error: possibly undefined macro: AC_CHECK_INCLUDES_DEFAULT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Code: Alles auswählen

root@birdie:~/work/g15stats# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/bash: /root/work/g15stats/config/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... none
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking for g15daemon_version in -lg15daemon_client... yes
./configure: line 12120: AC_CHECK_INCLUDES_DEFAULT: command not found
checking for egrep... (cached) /usr/bin/grep -E
checking for sys/wait.h that is POSIX.1 compatible... yes
checking g15daemon_client.h usability... yes
checking g15daemon_client.h presence... yes
checking for g15daemon_client.h... yes
checking libg15render.h usability... yes
checking libg15render.h presence... yes
checking for libg15render.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libgtop-2.0... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Code: Alles auswählen

root@birdie:~/work/g15stats# make
 cd . && automake-1.16 --gnu
configure.ac:7: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:7: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:10: error: required file 'config/compile' not found
configure.ac:10:   'automake --add-missing' can install 'compile'
configure.ac:7: error: required file 'config/missing' not found
configure.ac:7:   'automake --add-missing' can install 'missing'
Makefile.am: error: required file 'config/depcomp' not found
Makefile.am:   'automake --add-missing' can install 'depcomp'
make: *** [Makefile:374: Makefile.in] Fehler 1

Code: Alles auswählen

root@birdie:~/work/g15stats# aptitude search automake
i   automake                        - Werkzeug zum Erzeugen von Makefiles, die d
v   automake:i386                   -                                           
v   automake-1.16                   -                                           
v   automake-1.16:i386              -                                           
p   automake1.11                    - Tool for generating GNU Standards-complian
v   automaken                       -                                           
root@birdie:~/work/g15stats# 
Gruß,
Jörg

Benutzeravatar
MSfree
Beiträge: 10777
Registriert: 25.09.2007 19:59:30

Re: gcc: -avoid-version vs -fno-version

Beitrag von MSfree » 12.07.2023 15:09:39

Es ergibt eigentlich keinen Sinn, wenn der zweite Schritt mit einem Fehler aussteigt, die Schritte 3, 4... auszuführen.

JTH
Moderator
Beiträge: 3023
Registriert: 13.08.2008 17:01:41
Wohnort: Berlin

Re: gcc: -avoid-version vs -fno-version

Beitrag von JTH » 12.07.2023 16:52:37

MSfree hat geschrieben: ↑ zum Beitrag ↑
12.07.2023 15:09:39
Es ergibt eigentlich keinen Sinn, wenn der zweite Schritt mit einem Fehler aussteigt, die Schritte 3, 4... auszuführen.
Ja, das kann man sich dann natürlich sparen.


Nochmal zum Überblick, altmetaller: Du benutzt Bookworm? Gibt es einen Grund, warum du als root baust?

Vorweg: Du musst das Repository nicht immer neu clonen. Du kannst es (für diesen Anwendungsfall) mit

Code: Alles auswählen

git clean -dfx
git checkout -- .
in den „Originalzustand“ zurücksetzen (alle Buildartefakte löschen und eventuelle Änderungen an Dateien rückgängig machen).

Das autoreconf lief bei mir ohne diese Meldung durch:

Code: Alles auswählen

configure.ac:15: error: possibly undefined macro: AC_CHECK_INCLUDES_DEFAULT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
Der separate aclocal-Aufruf ist anscheinend nicht notwendig, den schließt autoreconf ein, wenn nötig. Vllt ist er sogar kontraproduktiv. Führt

Code: Alles auswählen

autoreconf --force --install
./configure
make
im sauberen Repo (siehe oben) zum Erfolg?

In ner immer parat liegenden, frischen & minimalen Bookworm-VM war nur Folgendes notwendig, um das Programm mit den drei Zeilen hier drüber bauen zu können (--force könnt man wohl auch weglassen). Fehlt dir davon noch was?

Code: Alles auswählen

apt install --no-install-recommends git make gcc libc6-dev libgtop2-dev libg15daemon-client-dev libg15render-dev libg15-dev automake autoconf libtool
Manchmal bekannt als Just (another) Terminal Hacker.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 12.07.2023 17:06:22

Hallo,

danke - ich bin momentan nicht mehr an dem Rechner; gucke mir das aber mal die nächsten Tage an. Im Zweifelsfall compiliere ich das Ding tatsächlich in einer VM, ziehe das Verzeichnis rüber und mache auf dem Zielrechner ein "make install".

Ich bin ja schon froh, dass hier Ideen geäußert werden. Ist halt 'ne kleine Bastelei um meine heißgeliebte G15 vollumfänglich zu nutzen^^

Gruß,
Jörg

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 07.08.2023 19:12:48

Hallo,
JTH hat geschrieben: ↑ zum Beitrag ↑
12.07.2023 16:52:37
Gibt es einen Grund, warum du als root baust?
ja - weil ich mir meine Programmierkenntnisse seinerzeit mit Turbo Pascal 3.02c angeeignet habe und seitdem nicht mehr viel mit Hochsprachen gemacht habe. Und natürlich, weil ich es (seit meiner ersten Distribution - Kernel 1.2.13) so gewohnt bin. Zumindest dann wenn ich damit rechne, dass irgendwann etwas in /usr/local/bin, /opt o.Ä. auftauchen sollte...?!?

Grundsätzlich bin ich eher kein Freund von selbstcompilierten Binaries und bemühe mich eher, meine Prozesse und Abläufe an die Pakete aus den offiziellen Repositories anzupassen statt umgekehrt :-)

Letztendlich hat es wie so funktioniert:
  • git clean -dfx
  • git checkout --
Jetzt habe ich in der configure.ac die doofe Zeile geauskommentiert:

Code: Alles auswählen

#AC_CHECK_INCLUDES_DEFAULT
Danach:
  • autoreconf --force --install
  • make
  • (und natürlich "make install")
Lieben Dank für eure Unterstützung!

Gruß,
Jörg

KP97
Beiträge: 3440
Registriert: 01.02.2013 15:07:36

Re: gcc: -avoid-version vs -fno-version

Beitrag von KP97 » 07.08.2023 19:29:56

altmetaller hat geschrieben: ↑ zum Beitrag ↑
07.08.2023 19:12:48
[*](und natürlich "make install")[/list]
...und natürlich hast Du jetzt am Paketmanager vorbei operiert, sollte man aber tunlichst unterlassen.
Dafür gibt es das Paket Debiancheckinstall, das baut ein Paket auf Deinem Rechner und dieses kannst Du dann mit dpkg -i installieren. Genauso läßt sich das Paket auch sauber entfernen.
Das Programm muß natürlich aus dem Repo installiert sein.

altmetaller
Beiträge: 108
Registriert: 03.02.2017 12:28:41

Re: gcc: -avoid-version vs -fno-version

Beitrag von altmetaller » 07.08.2023 22:18:59

Hallo,
KP97 hat geschrieben: ↑ zum Beitrag ↑
07.08.2023 19:29:56
Dafür gibt es das Paket Debiancheckinstall, das baut ein Paket auf Deinem Rechner und dieses kannst Du dann mit dpkg -i installieren.
Ja, wie gesagt - danke für diese Hinweise. Aus genau dem Grund frage ich ja hier :-)

LG,
Jörg

Antworten