-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generation of broken torrents with CFLAGS that differ from defaults #22
Comments
Have a look at https://github.com/cmclark65/mktorrent. I fixed at least one problem related to word size and also cleared a lot of compiler warnings and problems when forked mktorrent, and possibly that will fix the problems compiling for different architectures. I'm not sure how difficult it would be to merge my fork with the current main fork, since there have been a number of commits to the main since then. |
@cmclark65 thanks, it looks as your fork fixes it. Your main commit is really huge - could you split it up a bit? Currently it can't be merged into ruddes tree, and smaller pieces will help to update your improvements. |
| From: holgersson <notifications@github.com>
| @cmclark65 thanks, it looks as your fork fixes it. Your main
| commit is really huge - could you split it up a bit? Currently
| it can't be merged into ruddes tree, and smaller pieces will
| help to update your improvements.
I'd love to help you, but:
I cleared all the compiler warnings and added the features I
wanted 4 *years* ago.
I haven't done any programming that I recall since that time.
I don't really understand git or other concurrent/branching
source control systems and their use very well.
For sure, I believe my code is good and my fixes for all the
compiler warnings to be pedantically "correct", but I am not a
professional coder and don't have the time right now to
learn/relearn how to use git to break up my commit. Nor to go
through the main rudde branch to see what has changed since I
did this.
I'm sorry I didn't break my changes into three commits at the
time (the bug fixes; the auto piece size feature; the arbitrary
non-standard dictionary entry feature). I wasn't intending to do
the bug fixes but unfortunately one of the problems was that the
variable used to calculate the total data size of the files in a
torrent was over-flowing (which didn't actually cause a problem
most of the time) on some or all architectures, but I needed it
to be correct in order to calculate the piece size
automatically, and once I fixed that I found other type
declarations that were bad/wrong that needed to be right sized
also (mostly counters) ...
If you look at the diffs from my commit, the things you
want/need are all:
the diff for hash.c
the diff hash_pthreads.c
ignore the changes to init.c except the changes to the
includes.
ignore changes to main.c except changes to the includes
in mktorrent.h, just change the type of the "size" variable
and ignore the rest of my changes
I can't remember if my changes to prefix.c are necessary to
fixing the variable type/size issues or not but think they
are.
I think anyone who programs in c and understands git better than
I could port just that stuff over to the current rudde fork, and
*then* set your CFLAGS to add "-Wextra -pedantic" and properly
clear all warnings that remain on both 32 (with and without the
USE_LARGE_FILES defined) and 64 bit systems. And then mktorrent
should probably survive the architecture you are having issues
with using also. If so, commit that and do the pull request.
…--
Charles Clark | cmc@stegosaur.us
|
-> no but, your description actually helped me a lot ;-) |
Hi,
on Gentoo we have a bug where mktorrent-1.1 creates corrupt torrents when built with other CFLAGS than the default ones, e.g. "-march=native" (at least on Intel i-CPUs so far reported).
The compiler versions tested are gcc-6.4.0 and 7.3.0.
Any ideas what's wrong here?
The text was updated successfully, but these errors were encountered: