Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914154 - app-admin/syslog-ng-4.2.0 - emerge with distcc & cross compile fails, native works
Summary: app-admin/syslog-ng-4.2.0 - emerge with distcc & cross compile fails, native ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Cross compilation support
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-14 01:57 UTC by John L. Poole
Modified: 2023-09-19 17:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
distcc & cross compile build log (build.log.gz,453.79 KB, application/x-gzip)
2023-09-14 01:57 UTC, John L. Poole
Details
emerge --info '=app-admin/syslog-ng-4.2.0::gentoo' (emerge--info.txt,6.82 KB, text/plain)
2023-09-14 01:59 UTC, John L. Poole
Details
emerge -pqv '=app-admin/syslog-ng-4.2.0::gentoo' (emerge-pqv.txt,223 bytes, text/plain)
2023-09-14 02:00 UTC, John L. Poole
Details
/var/tmp/portage/app-admin/syslog-ng-4.2.0/temp/environment (environment,111.72 KB, text/plain)
2023-09-14 02:01 UTC, John L. Poole
Details
SUCCESSFUL build log after native compile (build.log.gz,75.30 KB, application/octet-stream)
2023-09-14 02:02 UTC, John L. Poole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John L. Poole 2023-09-14 01:57:08 UTC
Created attachment 870514 [details]
distcc & cross compile build log

On a Raspberry Pi 4B running GenPi64 I tried to build syslog-ng using distcc and a cross compiler and the build failed:

   zcat syslog-ng_distcc/build.log.gz |nl|less
   ...
 58850  distcc[11973] (dcc_exit) exit: code 0; self: 0.002862 user 0.017174 sys; children: 0.191240 user 0.105811 sys
 58851  distcc[11973] (dcc_cleanup_tempfiles_inner) deleted 2 temporary files
 58852  libtool: compile: mv -f "kv-parser-grammar.o" "modules/kvformat/.libs/libkvformat_la-kv-parser-grammar.o"
 58853  make[1]: *** [Makefile:26566: all-recursive] Error 1
 58854  make: *** [Makefile:11351: all] Error 2
 58855   * ERROR: app-admin/syslog-ng-4.2.0::gentoo failed (compile phase):
 58856   *   emake failed
 58857   *
 58858   * If you need support, post the output of `emerge --info '=app-admin/syslog-ng-4.2.0::gentoo'`,
 58859   * the complete build log and the output of `emerge -pqv '=app-admin/syslog-ng-4.2.0::gentoo'`.
 58860   * The complete build log is located at '/var/tmp/portage/app-admin/syslog-ng-4.2.0/temp/build.log.gz'.
 58861   * The ebuild environment file is located at '/var/tmp/portage/app-admin/syslog-ng-4.2.0/temp/environment'.
 58862   * Working directory: '/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0'
 58863   * S: '/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0'


However, I can successfully build the package natively if I disengage distcc non the Raspberry Pi 4B.  This worked:

     date; time FEATURES="-distcc keeptemp" MAKEOPTS="-j4" emerge --verbose  app-admin/syslog-ng

I kept the log file of the successful native build for comparison.

The build file for the distcc failure was 5.7 MB and the native build was 1,052 Kb, so both are compressed.

Other requested data to follow after creation of this bug.
Comment 1 John L. Poole 2023-09-14 01:59:59 UTC
Created attachment 870515 [details]
emerge --info '=app-admin/syslog-ng-4.2.0::gentoo'

emerge--info is after the distcc attempt.
Comment 2 John L. Poole 2023-09-14 02:00:34 UTC
Created attachment 870516 [details]
emerge -pqv '=app-admin/syslog-ng-4.2.0::gentoo'

after distcc attempt
Comment 3 John L. Poole 2023-09-14 02:01:09 UTC
Created attachment 870517 [details]
/var/tmp/portage/app-admin/syslog-ng-4.2.0/temp/environment

after distcc attempt
Comment 4 John L. Poole 2023-09-14 02:02:10 UTC
Created attachment 870518 [details]
SUCCESSFUL build log after native compile

being submitted for comparison purposes.
Comment 5 John L. Poole 2023-09-14 02:05:38 UTC
I have the usually requested information after an emerge completes, but since this was successful and I believe that the results would be identical to the "emerge--info" and "emerge-pqv" and environment, I am not uploading them.   But I do have them isolated should someone want them.

The focus probably will be at the point of failure: 

     make[1]: *** [Makefile:26566: all-recursive] Error 1

which looks like a path/structure issue more aligned with distcc handling rather than a disparity of compilers.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 02:18:14 UTC
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logmsg/.libs/libsyslog_ng_la-tags.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_tags_reinit_stats' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/logmsg/.libs/libsyslog_ng_la-tags.o: in function `log_tags_global_init':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logmsg/tags.c:212:(.text+0x590): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/timeutils/.libs/libsyslog_ng_la-cache.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `invalidate_cached_time' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/timeutils/.libs/libsyslog_ng_la-cache.o: in function `cached_g_current_time':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/timeutils/cache.c:241:(.text+0x2e8): dangerous relocation: unsupported relocation
libtool: compile: mv -f "map-value-pairs-grammar.o" "modules/map-value-pairs/.libs/libmap_value_pairs_la-map-value-pairs-grammar.o"
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/multi-line/.libs/libsyslog_ng_la-multi-line-logic.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `multi_line_logic_free_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/multi-line/.libs/libsyslog_ng_la-multi-line-logic.o: in function `multi_line_logic_init_instance':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/multi-line/multi-line-logic.c:37:(.text+0x10): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_source_driver_init_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: in function `log_threaded_source_driver_init_instance':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrsourcedrv.c:390:(.text+0x900): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_source_driver_deinit_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrsourcedrv.c:391:(.text+0x908): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_source_driver_free_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrsourcedrv.c:392:(.text+0x910): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_source_driver_pre_config_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrsourcedrv.c:393:(.text+0x918): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrsourcedrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_source_driver_start_worker' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrsourcedrv.c:394:(.text+0x920): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrfetcherdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_fetcher_driver_init_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/logthrsource/.libs/libsyslog_ng_la-logthrfetcherdrv.o: in function `log_threaded_fetcher_driver_init_instance':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrfetcherdrv.c:364:(.text+0x8dc): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrfetcherdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_fetcher_driver_deinit_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrfetcherdrv.c:365:(.text+0x8e4): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrsource/.libs/libsyslog_ng_la-logthrfetcherdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_fetcher_driver_free_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrsource/logthrfetcherdrv.c:366:(.text+0x8f0): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_worker_init_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: in function `log_threaded_dest_worker_init_instance':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:841:(.text+0x1c30): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_worker_deinit_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:842:(.text+0x1c3c): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_worker_free_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:843:(.text+0x1c48): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_driver_init_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: in function `log_threaded_dest_driver_init_instance':
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:1266:(.text+0x2148): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_driver_deinit_method' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:1267:(.text+0x2154): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_driver_free' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:1269:(.text+0x2168): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_driver_pre_config_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:1270:(.text+0x2178): dangerous relocation: unsupported relocation
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: lib/logthrdest/.libs/libsyslog_ng_la-logthrdestdrv.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `log_threaded_dest_driver_start_workers' which may bind externally can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/app-admin/syslog-ng-4.2.0/work/syslog-ng-4.2.0/lib/logthrdest/logthrdestdrv.c:1271:(.text+0x2184): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status

What exactly is on the other side of the distcc?
Comment 7 John L. Poole 2023-09-14 02:23:58 UTC
Answering above question: "What exactly is on the other side of the distcc"

Answer: an AMD Ryzen 5 with a cross compiler built 2 days ago:

    rpicc /home/jlpoole/work/rpi/20230912 # date; time crossdev --g 12.3.1_p20230526 --l 2.37-r3 --b 2.40-r5 --k 6.1  -P -v -t cross-aarch64-unknown-linux-gnu
      Mon Sep 11 17:25:19 PDT 2023
      ----------------------------------------------------------------------------------------------------------------------------------------
       * crossdev version:      20230616
       * Host Portage ARCH:     amd64
       * Host Portage System:   x86_64-pc-linux-gnu (i686-pc-linux-gnu x86_64-pc-linux-gnu)
       * Target Portage ARCH:   arm64
       * Target System:         aarch64-unknown-linux-gnu
       * Stage:                 4 (C/C++ compiler)
       * USE=multilib:          no
       * Target ABIs:           arm64
       
Here's the information about the target:

    GenPi64 /home/jlpoole # ./tell_me_cross-x_variables.sh
    crossdev --b '~2.40' --g '~12.3.1_p20230526' --k '~6.1' --l '~2.37' -t aarch64-unknown-linux-gnu
    GenPi64 /home/jlpoole #
Comment 8 John L. Poole 2023-09-17 18:48:01 UTC
On a separate image (same hardware), I determined it is possible I may not have re-instated "localhost" in /etc/distcc/hosts in the image reported out in this bug.  In my current image, again separate from the one in this bug, I have in /etc/distcc/hosts:

    GenPi64 /home/jlpoole # cat /etc/distcc/hosts
    # --- /etc/distcc/hosts -----------------------
    # See the "Hosts Specification" section of
    # "man distcc" for the format of this file.
    #
    # By default, just test that it works in loopback mode.
    #127.0.0.1
    192.168.[REDACTED]
    GenPi64 /home/jlpoole #

On this new instance, I was compiling apr as part of a subveversion install and ran into a failed build -- I noticed in the log a referenced to "localhost".  So I disengaged "distcc" in FEATURES within /etc/portage/make.conf and successfully emerged the problem package as well as subversion.  I then checked the above hosts file and saw that I had left the test mode in effect which removes localhost.  So, if a package is specified as not being subject to distcc and the local machine precludes compiling on localhost, will distcc provide an error message to that effect and halt, or will it attempt to compile on the remote server thereby running into problems the package owner may have already anticipated and for those reasons marked the package as not distcc compatible?  I checked  /var/db/repos/gentoo/app-admin/syslog-ng/syslog-ng-4.2.0.ebuild and did not see anything that would prevent it from being compiled remotely.  Any rate, I raise this here because a "user error" could occur from a carry-over testing setting and is distcc capable of detecting same and reporting out the conflict?
Comment 9 John L. Poole 2023-09-17 18:51:26 UTC
I should add that I cannot be 100% certain what the state of the image is as it is on a btrfs file system and I am experiencing re-instatement of previous version of the file system without any warning or indication of error.  For example, I moved a file, then sync;sync;reboot and in the new session, the file was not moved.  Nothing I can see that indicates btrfs was resorting to a prior image.  I just mention this issue in case a question arises that needs to me to report out the state of the image.
Comment 10 John L. Poole 2023-09-19 17:22:32 UTC
Please consider this matter suspended.  I've determine that the SanDisk Extreme Pro microSD card is exhibiting problems.  Everything seems to work, and when I reboot, all new files/changes are gone.  It's as if the card is in read-only mode, however, when mounted I have the experience of writing and it is not until the card is rebooted do I learn that nothing "stuck" despite using "sync";"sync" before a reboot.   I have subsequently resorted to using fdisk to remove the partitions and while fdisk reportedly successfully wrote the removal of the partiions, they remain.  I'm afraid at this time I opened this bug I was unaware that possibly the disk was appearing to be working, but, in fact, would not allow changes to persist between reboots.

I'm opening a case with Western Digital (owners of SanDisk).  It's looking like the btrfs file system is overwhelming the 50MB+/- limits (based on Rpi Forum topic, see reference in https://forums.gentoo.org/viewtopic.php?p=8802127#8802127 ) of the Raspberry Pi4B card slot causing a high I/O capacity SD card to go into some sort of mode where everything is frozen.  It's something the btrfs team and Western Digital will need to sort out, I'm going to sacrifice a clean disk to reproduce to lock problem which is simply emerge sys-kernel/raspberrypi-sources and in the final install step, the breakdown occurs.

In the meantime, I do not see it productive to spend time on this issue until the btrfs + Raspberry Pi card reader + fast I/O sd cards is sorted out.  I'm suspecting that the card and btrfs do not agree on how to handle a bottleneck the Rpi4B may introduce.