Skip to content

meson: add#397

Open
neheb wants to merge 1 commit intorakshasa:masterfrom
neheb:meson2
Open

meson: add#397
neheb wants to merge 1 commit intorakshasa:masterfrom
neheb:meson2

Conversation

@neheb
Copy link
Contributor

@neheb neheb commented Apr 22, 2025

Significantly faster than autotools thanks to Ninja and shorter code.

#390 was rejected because of speed. This is much faster.

Unfortunately, there seems to be an issue where the tests fail:

stderr:
test_tracker_list.cc:370:Assertion
Test name: test_tracker_list::test_scrape_success
assertion failed
- Expression: tracker_0.is_busy()

test_thread.cc:90:Assertion
Test name: test_tracker_list::test_scrape_failure
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list::test_has_active
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list_features::test_new_peers
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list_features::test_has_active
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list_features::test_find_next_to_request
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list_features::test_find_next_to_request_groups
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

test_thread.cc:90:Assertion
Test name: test_tracker_list_features::test_count_active
assertion failed
- Expression: torrent::utils::Thread::trylock_global_lock()

I've wasted hours trying to replicate autotools at this point to no avail.

The issue here might also be what's wrong with the BSDs. It's just now happening everywhere.

meson's pkgconfig file adds links to libcrypto and pthread, as it should.

subprojects available for zlib and libkqueue. None for cppunit unfortunately. Would allow testing on OmniOS.

@rakshasa
Copy link
Owner

If this gets merged, it means I need to keep two build systems up-to-date in order to merge PRs.

And one of them I have no experience with.

This is still a completely unacceptable solution.

@stickz
Copy link
Contributor

stickz commented Apr 22, 2025

I would recommend adding cmake instead as a build solution. It's entirely optional, widely used and easily understandable.

@neheb
Copy link
Contributor Author

neheb commented Apr 22, 2025

I would recommend adding cmake instead as a build solution. It's entirely optional, widely used and easily understandable.

I disagree with this. I'm not wasting more hours reimplementing the build.

@neheb
Copy link
Contributor Author

neheb commented Apr 22, 2025

If this gets merged, it means I need to keep two build systems up-to-date in order to merge PRs.

And one of them I have no experience with.

This is still a completely unacceptable solution.

Sure. I've marked it as draft.

@rakshasa
Copy link
Owner

I would recommend adding cmake instead as a build solution. It's entirely optional, widely used and easily understandable.

Still suffers the issue of adding indeterminate future overhead for very little real-world benefit.

This started as a big endian platform test build PR and morphed into a replacement (or rather, duplication) of the whole build system.

Experience would make you say early on that this is a bad idea, and if really needed should be maintained separately outside of the main repository.

If replacing the build system made sense, it would make so on the merits of how it is better in the general case. Not merely to add support for a single platform

@neheb
Copy link
Contributor Author

neheb commented Apr 22, 2025

to be fair I've had this locally for a long time. Adding libkqueue support allowed testing with that code path. I cleaned it up to match autotools as much as possible, in addition to some PRs cleaning up old autotools stuff.

The big endian thing is not related.

The main configure.ac clocks in at 118 lines. The main meson.build file is 136, which takes functionality from the various scripts. I think there's something to be said for simplicity.

@neheb
Copy link
Contributor Author

neheb commented May 3, 2025

The failures are now:

test_tracker_list.cc:370:Assertion
Test name: test_tracker_list::test_scrape_success
assertion failed
- Expression: tracker_0.is_busy()

tracker_test.cc:168:Assertion
Test name: test_tracker_list::test_scrape_failure
assertion failed
- Expression: is_busy() && is_open()

test_tracker_list.cc:487:Assertion
Test name: test_tracker_list::test_has_active
assertion failed
- Expression: "01110"[2] == '0' || tracker_2.is_busy()

???

@neheb neheb force-pushed the meson2 branch 2 times, most recently from 42aa358 to 49953f5 Compare May 10, 2025 21:42
@neheb
Copy link
Contributor Author

neheb commented May 10, 2025

ummm this is interesting.

by adding 3 extra files that i missed, tests succeed now. Wow what a waste of time that was.

@neheb neheb force-pushed the meson2 branch 5 times, most recently from c972a6b to 4034d48 Compare May 23, 2025 08:20
@neheb neheb force-pushed the meson2 branch 2 times, most recently from b162d5f to 87860fa Compare May 26, 2025 20:41
@neheb neheb marked this pull request as ready for review May 26, 2025 20:43
@neheb
Copy link
Contributor Author

neheb commented May 26, 2025

sped up test compilation. It matters on slow platforms.

@neheb neheb force-pushed the meson2 branch 2 times, most recently from b2c0717 to fd2fe7b Compare May 26, 2025 21:43
@neheb
Copy link
Contributor Author

neheb commented May 26, 2025

got execinfo working on BSDs: https://github.com/neheb/libtorrent/actions/runs/15262288336

@neheb
Copy link
Contributor Author

neheb commented May 28, 2025

All platforms are now green: https://github.com/neheb/libtorrent/actions/runs/15289713193

@neheb neheb force-pushed the meson2 branch 4 times, most recently from 895a1e4 to de8606e Compare June 3, 2025 21:28
@neheb neheb force-pushed the meson2 branch 2 times, most recently from b05cb39 to 0d0e7f1 Compare June 11, 2025 18:28
@neheb neheb force-pushed the meson2 branch 2 times, most recently from 9b7f277 to 9edf72b Compare June 17, 2025 19:23
@neheb neheb force-pushed the meson2 branch 2 times, most recently from eb10264 to 4af776d Compare June 19, 2025 02:27
@neheb neheb force-pushed the meson2 branch 2 times, most recently from fc7e511 to fe5eb02 Compare July 1, 2025 22:34
@neheb
Copy link
Contributor Author

neheb commented Jul 1, 2025

libatomic linking fixed.

@neheb neheb force-pushed the meson2 branch 4 times, most recently from cb0db1a to f497c13 Compare October 16, 2025 23:54
@neheb neheb force-pushed the meson2 branch 3 times, most recently from c717c8a to f8f56aa Compare November 15, 2025 23:03
@neheb neheb force-pushed the meson2 branch 2 times, most recently from 398d039 to 55ff5f8 Compare November 21, 2025 21:25
Significantly faster than autotools thanks to Ninja and shorter code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants