Skip to content

Conversation

@mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Jan 23, 2025

Description

This pull request includes the following:

  1. Adds Transmission version 4.1.0-beta.3 for testing.

Fixes #6410

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Package update

@mreid-tt mreid-tt self-assigned this Jan 23, 2025
@mreid-tt
Copy link
Contributor Author

@hgy59, testing with this beta version seems to be okay on my end. Do you have any objection to introducing a beta version to the repo to help resolve issues with certain trackers?

@hgy59
Copy link
Contributor

hgy59 commented Jan 25, 2025

@hgy59, testing with this beta version seems to be okay on my end. Do you have any objection to introducing a beta version to the repo to help resolve issues with certain trackers?

I do not recommend to publish beta versions for packages that aldready have approved versions. Anyone interested in this beta can download the package created by github build action.

@mreid-tt mreid-tt changed the title Transmission: Add v4.1.0-beta.1 Transmission: Add v4.1.0-beta.2 Mar 13, 2025
hgy59 referenced this pull request Aug 18, 2025
* Update to 4.0.6
* Use transmission archive that includes the submodules

---------

Co-authored-by: hgy59 <[email protected]>
@hgy59
Copy link
Contributor

hgy59 commented Nov 7, 2025

@mreid-tt beta.3 is available...

This is Transmission 4.1.0-beta.3. We're not in feature freeze yet, so this release includes some new features as well as bugfixes and performance improvements.

@mreid-tt mreid-tt changed the title Transmission: Add v4.1.0-beta.2 Transmission: Add v4.1.0-beta.3 Nov 8, 2025
@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 8, 2025

@mreid-tt beta.3 is available...

With the latest beta it does not build. From the log, it builds libcrc32c successfully:

  [59/154] Performing build step for 'crc32c'
  [1/6] Building CXX object CMakeFiles/crc32c_sse42.dir/src/crc32c_sse42.cc.o
  [2/6] Building CXX object CMakeFiles/crc32c.dir/src/crc32c_portable.cc.o
  [3/6] Building CXX object CMakeFiles/crc32c.dir/src/crc32c.cc.o
  [4/6] Building CXX object CMakeFiles/crc32c_arm64.dir/src/crc32c_arm64.cc.o
  [5/6] Linking CXX shared library libcrc32c.so.1.1.0
  [6/6] Creating library symlink libcrc32c.so.1 libcrc32c.so
  [60/154] Performing install step for 'crc32c'
  -- Install configuration: "Release"
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/libcrc32c.so.1.1.0
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/libcrc32c.so.1
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/libcrc32c.so
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/include/crc32c/crc32c.h
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/cmake/Crc32c/Crc32cTargets.cmake
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/cmake/Crc32c/Crc32cTargets-release.cmake
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/cmake/Crc32c/Crc32cConfig.cmake
  -- Installing: /github/workspace/spk/transmission/work-aarch64-7.1/transmission-4.1.0-beta.3+rf20fd5e373/build/third-party/crc32c.bld/pfx/lib/cmake/Crc32c/Crc32cConfigVersion.cmake
  [61/154] Completed 'crc32c'

But then the compiler does not look for the same files it built:

  [146/154] Linking CXX executable daemon/transmission-daemon
  FAILED: daemon/transmission-daemon 
  : && /github/workspace/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-g++ -I/github/workspace/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include -I/github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/include -fPIC  -O3 -DNDEBUG -L/github/workspace/toolchain/syno-aarch64-7.1/work/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/lib -L/github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/lib -Wl,--rpath-link,/github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/lib -Wl,--rpath,/var/packages/transmission/target/lib daemon/CMakeFiles/transmission-daemon.dir/daemon.cc.o daemon/CMakeFiles/transmission-daemon.dir/daemon-posix.cc.o -o daemon/transmission-daemon  -Wl,-rpath,/var/packages/transmission/target/lib  libtransmission/libtransmission.a  third-party/libevent.bld/pfx/lib/libevent.a  -lpthread  third-party/libdeflate.bld/pfx/lib/libdeflate.a  /github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/lib/libcurl.so  third-party/libpsl.bld/pfx/lib/libpsl.a  third-party/libnatpmp.bld/pfx/lib/libnatpmp.a  third-party/miniupnp/miniupnpc.bld/pfx/lib/libminiupnpc.a  third-party/dht.bld/pfx/lib/libdht.a  third-party/libutp.bld/libutp.a  third-party/libb64.bld/src/libb64.a  -lm  third-party/wildmat/libwildmat.a  third-party/crc32c.bld/pfx/lib/libcrc32c.a  /github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/lib/libssl.so  /github/workspace/spk/transmission/work-aarch64-7.1/install/var/packages/transmission/target/lib/libcrypto.so && :
  aarch64-unknown-linux-gnu-g++: error: third-party/crc32c.bld/pfx/lib/libcrc32c.a: No such file or directory

Not sure if there are any build options to fix this or if this is an upstream issue.

@hgy59
Copy link
Contributor

hgy59 commented Nov 8, 2025

For libcrc32 only the dynamic library is created (libcrc32c.so) but the linker wants to use the static library libcrc32c.a.

we don't disable static builds (like define --disable-static) so I don't have a clue what's going wrong...

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 8, 2025

Hey @mikedld, I recall you assisted with build issues in the past for Transmission on Synology. Looking at the above issue which only appears in the latest beta version, any thoughts on what may be causing it?

@mikedld
Copy link

mikedld commented Nov 8, 2025

Seems like adding CMAKE_ARGS += -DBUILD_SHARED_LIBS=OFF to cross/transmission/Makefile might help, although I'd say it shouldn't ideally be required for you to do that.

IIUC what's causing it is the build scripts setting BUILD_SHARED_LIBS to ON somewhere (in a toolchain file?).

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 8, 2025

Seems like adding CMAKE_ARGS += -DBUILD_SHARED_LIBS=OFF to cross/transmission/Makefile might help, although I'd say it shouldn't ideally be required for you to do that.

Thanks much for the quick feedback.

IIUC what's causing it is the build scripts setting BUILD_SHARED_LIBS to ON somewhere (in a toolchain file?).

@th0ma7, would any of the recent framework changes potentially affect this?

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 8, 2025

@mreid-tt certainly, I'll try to find some cycles either tomorrow or monday. At first glance I don't see why it would as I don't recall changing stuff specific to cmake, but worth double-checking.

Out of curiosity, have you tried building pre vs post framework changes (which I'll do anyway) - the tc_vars.mk may be revealing something between the two. As this is using CMake, it's rather the tc_vars.cmake and $(WORK_DIR)/<app_dir>/build/<arch>-toolchain.cmake that would be interesting comparing pre/post.

@hgy59
Copy link
Contributor

hgy59 commented Nov 8, 2025

@mreid-tt just fixed it.

We have some code in spksrc.cross-cmake-env.mk that defines -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS) when BUILD_SHARED_LIBS is not already defined.

# Allow building shared libraries to be manually set
ifeq ($(filter -DBUILD_SHARED_LIBS%,$(CMAKE_ARGS)),)
BUILD_SHARED_LIBS = ON
endif

and

CMAKE_ARGS += -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS)

That means, we always add -DBUILD_SHARED_LIBS=ON when -DBUILD_SHARED_LIBS=OFF is not defined.

The implementation is a bit shaky, because it adds CMAKE_ARGS += -DBUILD_SHARED_LIBS= when DBUILD_SHARED_LIBS is already defined.
so the final CMAKE_ARGS will contain -DBUILD_SHARED_LIBS= and -DBUILD_SHARED_LIBS=OFF in our case.

@th0ma7
we should add the line

CMAKE_ARGS += -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS)

only if BUILD_SHARED_LIBS is defined.

@hgy59
Copy link
Contributor

hgy59 commented Nov 8, 2025

Out of curiosity, have you tried building pre vs post framework changes (which I'll do anyway) - the tc_vars.mk may be revealing something between the two. As this is using CMake, it's rather the tc_vars.cmake and $(WORK_DIR)/<app_dir>/build/<arch>-toolchain.cmake that would be interesting comparing pre/post.

It has nothing to do with latest framework changes.
transmission added crc32s between beta.2 and beta.3 and this must be built as static library.

@hgy59
Copy link
Contributor

hgy59 commented Nov 8, 2025

Seems like adding CMAKE_ARGS += -DBUILD_SHARED_LIBS=OFF to cross/transmission/Makefile might help, although I'd say it shouldn't ideally be required for you to do that.

IIUC what's causing it is the build scripts setting BUILD_SHARED_LIBS to ON somewhere (in a toolchain file?).

You are absolutly right. There is a not so obvious definition of -DBUILD_SHARED_LIBS=ON in our framework.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 8, 2025

@hgy59, thanks for looking into this. I guess we'll revisit the need for this fix when Transmission 4.1 is out of beta.

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 9, 2025

@mreid-tt just fixed it.

We have some code in spksrc.cross-cmake-env.mk that defines -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS) when BUILD_SHARED_LIBS is not already defined.

# Allow building shared libraries to be manually set
ifeq ($(filter -DBUILD_SHARED_LIBS%,$(CMAKE_ARGS)),)
BUILD_SHARED_LIBS = ON
endif

and

CMAKE_ARGS += -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS)

That means, we always add -DBUILD_SHARED_LIBS=ON when -DBUILD_SHARED_LIBS=OFF is not defined.

The implementation is a bit shaky, because it adds CMAKE_ARGS += -DBUILD_SHARED_LIBS= when DBUILD_SHARED_LIBS is already defined.
so the final CMAKE_ARGS will contain -DBUILD_SHARED_LIBS= and -DBUILD_SHARED_LIBS=OFF in our case.

@th0ma7
we should add the line

CMAKE_ARGS += -DBUILD_SHARED_LIBS=$(BUILD_SHARED_LIBS)

only if BUILD_SHARED_LIBS is defined.

I'll check that out for certain. Although there are two use cases: with and without toolchain file. I presume what you are referring to is without but still the toolchain file would have something similar defined as well.

Absolutely worth a look, and nice catch.

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 9, 2025

So I've looked through the code and indeed there is something wrong, but only when building in legacy mode i.e. CMake without using a toolchain file which isn't the case here.

What hapens, is that it checks if -DBUILD_SHARED_LIBS% is part of $(CMAKE_ARGS), if not it sets BUILD_SHARED_LIBS = ON

# Allow building shared libraries to be manually set
ifeq ($(filter -DBUILD_SHARED_LIBS%,$(CMAKE_ARGS)),)
BUILD_SHARED_LIBS = ON
endif

Then when generating the "per-dependency" toolchain file which ends-up being located in ($WORK_DIR)/<app>/build/<arch>-toolchain.cmake processed from spksrc.cross-cmake-toolchainfile.mk it will enfore setting shared librairies definition only if BUILD_SHARED_LIBS isn't empty:

ifneq ($(strip $(BUILD_SHARED_LIBS)),)
        @echo "# build shared library" ; \
        echo "set(BUILD_SHARED_LIBS $(BUILD_SHARED_LIBS))"
endif

This check is missing for the legacy CMake build (i.e. no toolchain file) - but this is not impacting your build as you are building normally with using a toolchain file (I feel I repeated toolchain file too often ... 🤷 ). Still, changing the initial test to ifeq ($(or $(filter -DBUILD_SHARED_LIBS%,$(CMAKE_ARGS)),$(strip $(BUILD_SHARED_LIBS))),) allows you to define in cross/transmission/Makefile things using either CMAKE_ARGS like your doing or such as as BUILD_SHARED_LIBS = OFF.

I'll create a quick PR to patch this.

EDIT: @mreid-tt Fix tested using your branch and merged #6784 - you should now be able to safely use BUILD_SHARED_LIBS directly OR keep your code as-is using CMAKE_ARGS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downgrade or Pin transmission to 4.0.5

4 participants