Hallo Branden, thanks for trying to help.
Am Mittwoch, 7. Dezember 2022, 16:00:41 CET schrieb G. Branden Robinson: > Hello Heinz, > > At 2022-12-06T17:38:02+0100, Heinz-Jürgen Oertel wrote: > > after at least on year I was in the need to compile and install groff > > on Tumbleweed. > > That's openSUSE, for folks like me who didn't already know. > > > I got: > > CXXLD grodvi > > /usr/bin/ld: libgroff.a(libgroff_a-getopt.o): relocation R_X86_64_32 > > against `.rodata.str1.1' can not be used when making a PIE object; > > recompile with -fPIE > > This is a linker error[1] and suggests to me that the toolchain on your > system is misconfigured (or you have stale object files lying around, > but as you said below, you cleaned). It might also be the case that you > have a stray CFLAGS variable in your environment that is passing > inappropriate options to the build. > > A brute force approach would be to './configure' and/or 'make' with > 'CFLAGS=-fPIE' and see if that fixes it, but I think there might be a > cleaner solution... > > > The same error after a "git pull" and "make clean" with current > > sources > > When building groff from a Git checkout, you should use "make distclean" > instead of a regular "make clean". > > Our INSTALL.extra file mentions this. > > 5. You can remove the groff executables and other generated files from > the source code directory by typing 'make clean'. To also remove > the files that 'configure' created (so you can compile groff for a > different kind of computer or with different options to > 'configure'), type 'make distclean'. > > You mentioned that it had been a year since you built groff. It occurs > to me now that "make distclean" might also be good advice if the > toolchain on the system has changed, since theoretically defaults > regarding position-independent code (PIC) and position-independent > executables (PIE) might have changed. You can likely rely on Autoconf > to detect and adapt to such changes, but "make clean" does not erase > what the "configure" script produces--and that script is what runs all > the Autoconf checks. > > I'm not certain, but my guess is that any sort of ABI break could cause > problems like this, and some years ago, C++ on Linux was notorious for a > series of ABI breaks. So much so that a crust of thick-walled > conservatism has formed over current practice, less due to sagacious > wisdom from experts than terror of disrupting a fragile status quo.[2] > > Anyway, "make distclean", re-"./configure", and try again. Does not work. > Alternatively, for your convenience I'm attaching the script I've been > using for years to do clean builds _all the time_. It's called > "make-groff-fast" because I have another that runs "make distcheck", > which more than doubles the build time, and probably only a groff > maintainer would care to test a build from a distribution archive.[3] asks for libtoolize, is called libtool on my system Did a make distclean, than ./make-groff-fast but anyway, this also doesn't work ended up with adding -fPIE to CFLAGS = -g -O2 -fPIE and CXXFLAGS = -g -O2 -fPIE and now have GNU troff (groff) version 1.23.0.rc1.3490-ed8c Grüße Heinz