!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

397 Members
92 Servers

Load older messages


SenderMessageTime
14 Sep 2024
@artturin:matrix.orgArtturin
In reply to @kamillaova:matrix.org
I'm semi-fixed qt6 so I need to test those fixes
And I'm asking for qt6 testing checklist

Maybe, which apps, features etc need to be tested
@k900:0upti.me: at least builds to qtwebengine
02:20:25
@artturin:matrix.orgArtturinChoose a few graphical programs which use the qt wrapper02:21:08
@kamillaova:matrix.orgKamilla 'ova what about settings like QTQPAPLATFORM? which ones need to be tested? 02:23:32
@artturin:matrix.orgArtturin If you need to you can build all the qt6 packages with nix build -f qt6Packages 02:23:36
@kamillaova:matrix.orgKamilla 'ova what about settings like QT\QPA\PLATFORM? which ones need to be tested? 02:38:55
@kamillaova:matrix.orgKamilla 'ova what about settings like QT_QPA_PLATFORM? which ones need to be tested? 02:39:15
@ss:someonex.netSomeoneSerge (utc+3) changed their display name from SomeoneSerge (nix.camp) to SomeoneSerge (utc+3).11:38:02
@symphorien:xlumurb.eusymphorien joined the room.15:25:07
@reckenrode:matrix.orgRandy Eckenrode joined the room.15:25:51
@reckenrode:matrix.orgRandy Eckenrode

I’m trying to package libxo, which is needed by updated Darwin source releases. I’m also working on Darwin cross-compilation. libxo is failing to build while cross-compiling. It doesn’t ship a pre-generated configure script, so I use autoreconfHook to generate it. When I try to cross-compile, it fails because libtool tries to invoke un-prefixed clang instead of ${stdenv.cc.targetPrefix}clang.

Are there any examples of packages using autoreconfHook and libtool that work with cross-compilation, so I can see what I’m (or upstream is) doing wrong?

15:28:25
@artturin:matrix.orgArtturin
In reply to @reckenrode:matrix.org

I’m trying to package libxo, which is needed by updated Darwin source releases. I’m also working on Darwin cross-compilation. libxo is failing to build while cross-compiling. It doesn’t ship a pre-generated configure script, so I use autoreconfHook to generate it. When I try to cross-compile, it fails because libtool tries to invoke un-prefixed clang instead of ${stdenv.cc.targetPrefix}clang.

Are there any examples of packages using autoreconfHook and libtool that work with cross-compilation, so I can see what I’m (or upstream is) doing wrong?

--keep-failed and check the generated configure for clang
15:31:53
@artturin:matrix.orgArtturinQuite weird https://github.com/Juniper/libxo/blob/fd5db1b4fba49e1f4c35d6c466710c0e89f54043/configure.ac#L371-L38315:32:30
@artturin:matrix.orgArtturinis this the libxo you're using?15:33:14
@reckenrode:matrix.orgRandy EckenrodeThat’s the one.15:33:31
@artturin:matrix.orgArtturinAh it's just some gcc warnings https://github.com/search?q=repo%3AJuniper%2Flibxo%20have_gcc&type=code15:33:53
@artturin:matrix.orgArtturin Post the whole configure in a gist 15:34:00
@reckenrode:matrix.orgRandy Eckenrodehttps://gist.github.com/reckenrode/e6209e3edc5c6f523716f959ac6c762a15:34:43
@reckenrode:matrix.orgRandy Eckenrode
libxo.la: $(libxo_la_OBJECTS) $(libxo_la_DEPENDENCIES) $(EXTRA_libxo_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libxo_la_OBJECTS) $(libxo_la_LIBADD) $(LIBS)
15:35:21
@reckenrode:matrix.orgRandy Eckenrode
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
15:35:35
@reckenrode:matrix.orgRandy Eckenrode It’s invoking libtool to link, which has LTCC set to clang. 15:35:47
@reckenrode:matrix.orgRandy Eckenrode Those snippets are from the generated libxo/Makefile. 15:36:05
@artturin:matrix.orgArtturinSeems like the same thing I encountered in https://github.com/NixOS/nixpkgs/pull/104778#issuecomment-173085164215:36:38
@reckenrode:matrix.orgRandy Eckenrode

That seems to really confuse it.

ld: warning: ignoring file xo_toupper.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x78 0x6F 0x5F 0x74 0x6F 0x75 0x70 0x70 0x65 0x72 0x2E 0x6C 0x6F 0x20 )ld: warning: ignoring file xo_utf8.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x78 0x6F 0x5F 0x75 0x74 0x66 0x38 0x2E 0x6C 0x6F 0x20 0x2D 0x20 0x61 )
ld: warning: ignoring file xo_tolower.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x78 0x6F 0x5F 0x74 0x6F 0x6C 0x6F 0x77 0x65 0x72 0x2E 0x6C 0x6F 0x20 )
ld: warning: ignoring file xo_syslog.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x78 0x6F 0x5F 0x73 0x79 0x73 0x6C 0x6F 0x67 0x2E 0x6C 0x6F 0x20 0x2D )

ld: warning: ignoring file libxo.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x6C 0x69 0x62 0x78 0x6F 0x2E 0x6C 0x6F 0x20 0x2D 0x20 0x61 0x20 0x6C )
ld: warning: ignoring file xo_encoder.lo, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x23 0x20 0x78 0x6F 0x5F 0x65 0x6E 0x63 0x6F 0x64 0x65 0x72 0x2E 0x6C 0x6F 0x20 )
15:40:13
@artturin:matrix.orgArtturinCan you post the libxo expr15:45:26
@artturin:matrix.orgArtturinvoid linux has it so it should work on linux15:45:49
@kamillaova:matrix.orgKamilla 'ova
-buildInputs = [ ffmpeg_7 ]
+buildInputs = [ (symlinkJoin { name = "ffmpeg-lib-dev"; paths = [ ffmpeg_7.dev ffmpeg_7.lib ]; }) ]

is this a very bad fix? qtmultimedia's FindFFmpeg tried to find ffmpeg libraries in lib output, not dev

qtmultimedia> CMake Warning at cmake/FindFFmpeg.cmake:290 (message):
qtmultimedia>   FFmpeg pc file
qtmultimedia>   /nix/store/ksj5nj8l0nk2vy9kah8kay1s1fzsdnnq-ffmpeg-riscv64-unknown-linux-gnu-7.0.2-lib/lib/pkgconfig/libavcodec.pc
qtmultimedia>   is not found
qtmultimedia> Call Stack (most recent call first):
qtmultimedia>   cmake/FindFFmpeg.cmake:312 (__ffmpeg_internal_set_dependencies)
qtmultimedia>   /nix/store/gj681sc49j97ikyhygmaz4nc23fvv9gq-qtbase-riscv64-unknown-linux-gnu-6.7.2/lib/cmake/Qt6/QtFindPackageHelpers.cmake:156 (find_package)
qtmultimedia>   src/multimedia/configure.cmake:31 (qt_find_package)
qtmultimedia>   /nix/store/gj681sc49j97ikyhygmaz4nc23fvv9gq-qtbase-riscv64-unknown-linux-gnu-6.7.2/lib/cmake/Qt6/QtModuleHelpers.cmake:670 (include)
qtmultimedia>   src/multimedia/CMakeLists.txt:18 (qt_internal_add_module)

and after 20 minutes of reading FindFFmpeg I can't see a better solution to this problem
16:04:19
@kamillaova:matrix.orgKamilla 'ovahttps://hydra.nixos.org/build/271308886/nixlog/116:06:55
@symphorien:xlumurb.eusymphorienit will put the headers in the runtime closure of qtmultimedia16:07:59
@kamillaova:matrix.orgKamilla 'ova
In reply to@kamillaova:matrix.org
https://hydra.nixos.org/build/271308886/nixlog/1
ok, it seems it's not a cross compilation issue

but I'm getting this error (when building under system = "aarch64-linux"; crossSystem = "riscv64-linux";):

qtmultimedia> CMake Error at /nix/store/gj681sc49j97ikyhygmaz4nc23fvv9gq-qtbase-riscv64-unknown-linux-gnu-6.7.2/lib/cmake/Qt6/QtTargetHelpers.cmake:171 (target_link_libraries):
qtmultimedia>   Target "QFFmpegMediaPlugin" links to:
qtmultimedia>
qtmultimedia>     Qt::OpenGLPrivate
qtmultimedia>
qtmultimedia>   but the target was not found.  Possible reasons include:
qtmultimedia>
qtmultimedia>     * There is a typo in the target name.
qtmultimedia>     * A find_package call is missing for an IMPORTED target.
qtmultimedia>     * An ALIAS target is missing.
qtmultimedia>
qtmultimedia> Call Stack (most recent call first):
qtmultimedia>   src/plugins/multimedia/ffmpeg/CMakeLists.txt:189 (qt_internal_extend_target)
16:11:59
@mwoodpatrickmx:matrix.orgmwoodpatrickmx joined the room.16:12:06

Show newer messages


Back to Room ListRoom Version: 6