Giter Site home page Giter Site logo

rhash / rhash Goto Github PK

View Code? Open in Web Editor NEW
545.0 31.0 113.0 2.9 MB

Great utility for computing hash sums

Home Page: http://rhash.sf.net

License: BSD Zero Clause License

C 85.88% Java 2.89% C# 1.50% Perl 1.94% PHP 0.44% Ruby 0.42% Shell 1.41% Python 2.16% Makefile 2.59% XS 0.61% M4 0.11% Raku 0.07%
hash-functions rhash magnet-link librhash sha3 gost3411-2012 edon-r unix linux macos

rhash's Introduction

RHash

RHash (Recursive Hasher) is a console utility for calculation and verification of magnet links and various message digests, including CRC32, CRC32C, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, DC++ TTH, BitTorrent BTIH, Tiger, GOST R 34.11-94, GOST R 34.11-2012, RIPEMD-160, HAS-160, EDON-R, and Whirlpool.

Message digests are used to ensure and verify integrity of large volumes of data for a long-term storing or transferring.

Program features:

  • Ability to process directories recursively.
  • Output in a predefined (SFV, BSD-like) or a user-defined format.
  • Calculation of Magnet links.
  • Updating hash files (adding message digests of files missing in the hash file).
  • Calculates several message digests in one pass.
  • Portability: the program works the same on Linux, Unix, macOS or Windows.

Installation

./configure && make install

For more complicated cases of installation see the INSTALL.md file.

Documentation

Links

Contribution

Please read the Contribution guidelines document.

License

The code is distributed under BSD Zero Clause License.

rhash's People

Contributors

0-wiz-0 avatar 1024mb avatar ahohnmyc avatar bentley avatar bradking avatar chewi avatar danfe avatar egorpugin avatar ffontaine avatar floand avatar georgeraraujo avatar grobian avatar gruenich avatar haubi avatar jakub-zwolakowski avatar jpetermugaas avatar jrepp avatar kant avatar lvd2 avatar mwhudson avatar pixelb avatar przemoc avatar rejectedcode avatar rhash avatar sbasalaev avatar szeder avatar tytso avatar zakkemble avatar zinnkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rhash's Issues

Падение скорости работы

Заинтересовавшись подросшим размером бинарников, списал часть на локализацию, но попутно наткнулся на старый скрипт тестирования скорости и в голову внезапно пришла мысль проверить: результат несколько опечалил.

x86      1.3.3 | 1.3.4 | 1.3.5
------------------------------
crc32  |  3502 |  3277 |  8069
md5    |  3544 |  3563 |  7076
sha1   |  7418 |  8869 |  8786
sha256 | 10858 | 10758 | 12021
sha512 | 27153 | 26154 | 29244
------------------------------
x64      1.3.3 | 1.3.4 | 1.3.5
------------------------------
crc32  |  3415 |  3372 |  7974
md5    |  4140 |  3762 |  7277
sha1   |  7655 |  7734 | 10618
sha256 |  9181 |  9827 | 11051
sha512 |  5812 |  6723 | 13606

Время в миллисекундах, среднее арифметическое по трём замерам, округлял по первому знаку после запятой.

Возможно ли что-нибудь сделать?

P.S. Результат sha512 под х64 особенно неожиданный, в том числе в сравнении с sha256.

As of 1.3.3, I need to build three times

This is how I have to build now when I want to install it to /srv/current/stack:

install_dir=/srv/current/stack
make -j$(getconf _NPROCESSORS_ONLN) clean PREFIX= DESTDIR=${install_dir}

# For some reason, building three times works.. :'(
make -j$(getconf _NPROCESSORS_ONLN) install PREFIX= DESTDIR=${install_dir} \
  || make -j$(getconf _NPROCESSORS_ONLN) install PREFIX= DESTDIR=${install_dir} \
  || make -j$(getconf _NPROCESSORS_ONLN) install PREFIX= DESTDIR=${install_dir}

The first time it fails on:

gcc -c  -pipe -DIN_RHASH  -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash.c -o rhash.o
install: cannot stat ‘rhash’: No such file or directory
make[1]: *** [install-binary] Error 1
make[1]: *** Waiting for unfinished jobs....

Then the second time it fails on:

install -d /srv/current/stack/etc
install -m 755 rhash /srv/current/stack/bin
install -m 644 dist/rhash.1 /srv/current/stack/share/man/man1/rhash.1
sed -e 's/\x0D//g' dist/rhashrc.sample > rc.tmp && install -m 644 rc.tmp /srv/current/stack/etc/rhashrc
install: cannot stat ‘rhash’: No such file or directory
make[1]: *** [install-binary] Error 1
make[1]: *** Waiting for unfinished jobs....

And the third time, it succeeds.

1.3.2 did not have this problem

Discussion: move the rhash build to something standard

Just a thought, but consider the idea of moving the rhash build from its current custom
configure/Makefile pair to something more standard, say autotools or cmake. It would
require less specialized knowledge (the build system used only here vs build systems
used by just about every major open source library) to update and would probably cut
down on issues like https://bugs.gentoo.org/650840 which was fixed in gentoo/gentoo@8659d46

I'm personally willing to put in the work myself, if given a decision on what to use. I'm
good enough with both autotools and cmake to do the job.

osx port

hello,
currently rhash cannot be compiled on osx, is it in your roadmap ?
all I find is an old homebrew patch: https://sourceforge.net/p/rhash/feature-requests/23/
may I suggest using cmake instead of Makefiles ? I could write an initial port if your ok with the principle, (that would also allow compilation with msvc).

some bug in rhash md5.c

In function
void rhash_md5_update(md5_ctx ctx, const unsigned char msg, size_t size)
//----------------------------------------------------------------------------------------------------------
if(index) {
unsigned left = md5_block_size - index;
le32_copy((char*)ctx->message, index, msg, (size < left ? size : left));
if(size < left) return;

/* process partial block */
rhash_md5_process_block(ctx->hash, ctx->message);
msg += left;
size -= left;
}

//----------------------------------------------------------------------------------------------------------
this codes is unnecessary.

In function
void rhash_md5_final(md5_ctx ctx, unsigned char result)
//------------------------------------------------------------------------------------------------------
ctx->message[14] = (unsigned)(ctx->length << 3);
ctx->message[15] = (unsigned)(ctx->length >> 29);
//------------------------------------------------------------------------------------------------------

this code must think about bytes endian ?

Manual should mention that check (-c) can be combined with hash option (--md5) for faster speed

I discovered that verifying hashes with -c is much slower than generating them.

I was using this command:

rhash -c --skip-ok download.sfv

iotop reported disk read speeds of 30 MB/sec and rhash was consuming 100% CPU.

Then I thought, how does rhash know that the SFV file contains MD5 hashes? It probably doesn't, and it runs all checksum algorithms when doing a check and sees if any of those match the value in the SFV file... that's not very efficient.

Changing the command line to:

rhash -c --md5 --skip-ok download.sfv

...was much faster (just as fast as generating them), reaching speeds of 95 MB/sec with only 30% CPU use.

I think the man file should mention this ;-)

Точка входа в процедуру _vsnprintf_s не найдена в библиотеке DLL msvcrt.dll

Версия 1.3.5 на WinXP (с 1.3.4 и ниже вроде порядок).
В файле https://sourceforge.net/projects/rhash/files/rhash/1.3.5/README.txt указаны системные требования:

The Win32 version requires: Win XP/2K/Vista/7/8/10

Функция _vsnprintf_s присутствует только в WinVista+, похоже, дело в версии MinGW/MSYS. Возможно ли исправить?

P.S. Спасибо за продолжение разработки, пользовался 1.3.3, случайно узнал.

excluding one folder

As from #9, could you please provide a find piping example command to exclude the folder donotinclude in a situation like below but processing all the rest recursively. I have tried find but could not make it to exclude it because of -r

Top
--file1
--file2
--subfolder1
--subfolder2
--donotinclude

The --exclude is only for file types and excluding folders would really be nice to have

my curren tcommand for full rhash

rhash -Mr Top -o myhash.md5

Request for Sort Options

This is a really great program, thank you so much!

I was wondering if there were sorting options, I don't seem to see any but maybe I've missed it. rhash sorts alphabetically ignoring case, which is much better than most hash software already (thank you).

It would be nice to have the ability to sort subdirectories first or last (--dirsfirst or --dirslast) when using the --recursive option.

Sorting by name(case sensitive or not),size,mtime,ctime,etc would be nice too, but sorting directories first or last would be really helpful with productivity.

Sorry if this option is present and I've overlooked it. And if it's something you're not interested in I can understand that. Thank you again so much for this software, I really love it!

[EXPIRED] xxHash

Пожалуйста, добавьте поддержку алгоритма xxHash — это шаг в будущее, доступное в 202 строчках кода. Судя по тестам, работает шустрее CRC32, что пригодится при подсчёте контрольных сумм *.iso, *.mkv, БД и тому подобных больших файлов. Сегодня это есть в HashOnClick, но, увы, за $$$.

rhashrc

Rhash does not seem to be honoring the 'percents=on' in the config file. The others all seem to be working fine.

Also, --percents on the command-line works as expected.

[REJECTED] Blake2

Алексей, присмотритесь к Blake2, пожалуйста.
Сравнивал рядом rhash --md5 и b2sum (скачать), скорость одна.
Собираетесь ли поддерживать его?

RHash - build MSYS and CygWin issues including patch for 1.3.5

001-mingw-cygwin-msys.patch.txt

I was compiling RHash with MSYS and GNU GCC 6.30 as a prerequisit for cmake and I ran into some issues tried to address. The patch does work with RHash 1.3.5 (but I'm not sure about the master branch). There were several issues that I tried to fix.

  1. MSYS2 and Cygwin do NOT use the lib prefix name for the .DLL. The conventions are the prefix "msys-" for MSYS and "cyg" for CygWin. I had to make a way to override that in the makefile with the variable "DLLNAME_PREFIX".
  2. I wanted the make file to do some processing specifically for Windows such as have a separate .DLL and .dll.a import library for shared builds as well as build .EXE's using that convention. I'm well aware that GCC can use the imports right from the .DLL but this is not often done (probably for compatibility with compilers that are not able to support this. Thus, I also created another variable for IS_WIN that supports this as well as triggers some things with tests in Windows so that you could have a more uniform usage in the Makefile. The most ideal fix would be to consider doing something like use autoconf or cmake.
  3. Cygwin and MSYS2 use the standard " __declspec(dllexport)" just like Windows. Those are just software layers that sit above Windows. Along this line, you can actually use some Windows functions within MSYS for a half-in-half out approach.
  4. When using the SSL runtime, the OpenSSL names are different in MSYS and CYGWIN. In MSYS, it's probably "msys-crypto-1.0.0.dll" and in CygWin, it's "cygcrypto-1.0.0.dll".
  5. MSYS GCC defines "MSYS" in addition to "CYGWIN". CygWin defines "CYGWIN". _WIN32 is NOT defined for MSYS and CygWin. This is something that has to be noted when reviewing my work as I deliberately omitted "MSYS".
  6. I have had to use the frequency timer stuff from Windows since some tests depended upon "set_benchmark_cpu_affinity" and I also thought it might be better for the static build tests and perhaps for RHash.exe if it was using that capability.
  7. In "RHash-1.3.5/tests/test_rhash.sh", I noticed that the "//" path issue ONLY applies if you are compiling and testing the native Windows version of the MINGW RHash. When building and testing the "MSYS" version for the MSYS environment, you don't get that issue so I had to adjust the workaround in the .sh script appropriately. Note that I was using the MSYS2 (http://www.msys2.org/) pacman "makepkg" facility including the "makepkg-mingw" for MINGW builds.

I have verified that the patch does work in MSYS2 as well for MINGW-64 as well as MINGW32.

Different output values for sha256 on Linux vs Solaris

Consider "ATTACKATDAWN" who's SHA3-256 value is: "c053064d7dc0753969b144e8242e1b366cc5259cc8a5825b60f74d630e2e2c3e" (use this online tool to validate)
On Linux Ubuntu 16.04 with gcc 5.4.0 the output is as expected as used by this tiny program:

$ ./tiny
Sha value is: c053064d7dc0753969b144e8242e1b366cc5259cc8a5825b60f74d630e2e2c3e

On Solaris 10 with 3.4.3 the value is completely different:

$ ./tiny
Sha value is: 82685dd2d6396de07f9992062921bf2e148e2d425b77083b302bcaee3deb7865

Test program source is below

#include "libs/crypto/sha3.h"
#include <stdio.h>
#include <stdlib.h>
#include "libs/types.h"
#include <string.h>
int main(void) {
        char *s_secret="ATTACKATDAWN";
        sha3_ctx ctx;
	uint8_t hash[32];
        sha3_256_init(&ctx);
        sha3_update(&ctx, (uint8_t*)s_secret, strlen(s_secret));
        sha3_final(&ctx, hash);
        print_hex("Sha value is", &hash, 32);
        printf("\n");
        return 0;
}

(the libs/types.h etc are files of no consequence but can be taken from dnscat solaris10 branch

recursive not working on updating existing checksum file?

I have about 2TB of data in OpenMediaVault on a BeagleBoneBlack. I was thinking of using RHash to periodically generate an MD5 file to verify the integrity of the files with a backup. Due to the huge data set and the slow USB speed provided by the BBB, it'll likely take a few days for all data to be hashed.

That's where the --update parameter of RHash was to supposed to help in case the process gets somehow interrupted. However, it doesn't appear as if the update actually works recursively. It only seems to be picking up files in the same folder the checksum file is located in. Here's the command I tried:
rhash --md5 -ru test.md5

test.md5 is located in the folder that contains all the folders / files that RHash is supposed to generate checksums for. I've also tried adding -vv but it doesn't provide any clue on what may be the problem.

Is there really not an option to have RHash recursively perform an update? Will this be added in a future update?

I'm using Debian Wheezy, which is still on RHash 1.2.9-8, but even installing the Jessie release version 1.3.3-1 doesn't seem to make any difference.

[EXPIRED] Extra benchmark

Обратите внимание на консольную утилиту digest.exe. Будучи далека от Rhash по удобству, она имеет встроенный benchmark и ряд современных, нереализованных здесь алгоритмов (например, весьма скоростной Skein). Его результаты могут подсказать дальнейшее развитие Rhash.

Installing additional symlinks to rhash

Would it be possible to extend the SYMLINKS variable in the Makefile in order to allow install-symlinks to create a symlink for each hash method available?

Does an up to date release tarball exist newer than 1.3.2 ?

I see a large collection of new files in the git repo that do not exist in the 1.3.2 tarball. Seems as if many problems have been fixed already such as the rhash_ctz() function which won't even compile because var v is not defined anywhere inside byte_order.c as well as a ton of other changes. Not sure how to proceed with the existing gitrepo as there are now directories for java and mono pieces that did not exist at all in the 1.3.2 release. Regardless, seems librhash.so.1 is needed to build cmake which is needed to buid MySQL so the RHash code is in front of me at the moment. I see at https://sourceforge.net/projects/rhash/files/rhash/1.3.4/ that the 1.3.2 release is said to be the "latest" but clearly there must be a 1.3.4 or even newer?

[Request] Use a faster lib for crc32

I used SFV-Check to check a sfv file using crc32 and it was 2.56 times (256%) faster than RHash (sfv-hash).

Running rhash benchmark show that md4 and even md5 are faster to compute than crc32.

I see that RHash CRC32 follows the CRC32-IEEE 802.3.

But SFV-Check is using Zlib crc32 that follows ITU-T V.42.

CRC32 is the simplest algorithm (supported by RHash) to compute so it should be the fastest.

But there are even faster algorithms, for example Intel's slicing-by-8 CRC32 is about 4 times faster than Zlib's crc32.

The Fast CRC32 article show throughput, CPU cycles/byte, time, implementations in C and a lot more stuff about all major crc32 implementation algorithms.

Can you please take a look at those faster crc32 algorithms and may be RHash will be as fast as the light one day 😄

[Discussion] Building binary language-bindings packages.

For some time I considered language-bindings (python/java/rubby/...) as almost separate project and for many years released them on SF as separate tarballs. Supporting large binary rhash package with all bindings included can be a big pain, because languages are updated, internal interfaces change, building tools, packaging rules and files layout are also changed. It will be much easier to support rhash and bindings packages (all in one, or a package per language) built from separate source packages.

For development simplicity I keep RHash and bindings in one source tree. Distribution maintainers usually want to automatically download releases directly from GIT signed tags (skipping SF mediation). So I switched to GitHub-generated releases (and releasing became easer), but we've got now one big source tarball. As result, we have big os-dependent source packages. If somebody wants to build bindings packages, he will get the described above problem.

I still don't want to separate bindings into another GitHub project. There shall be many GitHub projects like this, living with a number of plugins/modules in the main source-tree.

If an OS maintainer find impossible to split release source tree into different source packages, then he should build only a minimal (maintainable) number of language packages, or maybe find a team to co-maintain it.

Have you encountered such problem? How is it actually on the packaging end? Do you have an universal solution or may be thoughts on the issue?

[FIXED] GOST R 34.11-2012 aka Streebog

Сегодня RHash поддерживает выходящий из употребления отечественный хэш GOST R 34.11-94, который сменяется «Стрибогом», Известно несколько наших реализаций (Казимирова, Лебедева, Дягтерёва, авторского коллектива — см. сравнение производительности за 2014 год), есть и зарубежные.

Когда ожидать в RHash? Так сказать, на волне импортозамещения.

Proposal to add an additional --printf formating directive to output a URL-encoded full path

Thanks for your excellent 'rhash' program.

I would find rhash even more useful for creating machine-readable output (such as tab-delimited files or JSON files) if it provided an option to output a URL-encoded version of the full path.

The existing feature of URL-encoding a filename, along with the flexible --printf feature, gets close -- but it can still be problematic if you have a directory name with special characters like quotation marks, commas, or newlines.

I'd like to propose adding an additional --printf formatting directive that can output the URL-encoded full path.

(I have a working version of a patch here 94a930a , and can submit a pull request for it.)

byte_order.c breaks if byte_order.h uses the bswap_32() fallback macro

Hello everyone,

If byte_order.h is run through clang (in my case, clang++), the file concludes that if all else fails, the fallback macro shall be used:

#define bswap_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) |
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))

Problem: byte_order.c contains code like: bswap_32( *(src++) )

The above will accidently execute "*(src++)" multiple times as "x" in the fallback macro (instead of just once).

Also, to check if 32/64-bit bswap intrinsics can be used, tests like the following:

#elif (defined(GNUC) && (GNUC >= 4) && (GNUC > 4 || GNUC_MINOR >= 3))

should be expanded to simply check for clang as well, like:

#elif defined(clang) || (defined(GNUC) && (GNUC >= 4) && (GNUC > 4 || GNUC_MINOR >= 3))

Luckily, you don't need bswap_16 which appeared in later clang versions, while 32/64-bit swappers were added early and can simply be assumed to be present as long as clang is defined.

Other than that, your SHA/SHA3 sources compile & run just fine if compiled as C++ btw.

Great implementation - small, easy, nice & fast. Thank you very much!

Build DEB packages

Почему в control в Build-Depends стоит debhelper (>= 11)? Это значит, что в Ubuntu-based дистрибутивах до версии 18.04 собрать deb-пакеты без бубна не получится, хотя 16.04 LTS будет поддерживаться ещё несколько лет и 17.10 до июля (даже 1.3.5 недоступна), а релиз 18.04 будет только в апреле.

Edit; Хм... в репе Debian в stretch-backports, для текущего релиза, вижу debhelper-11~bpo9+1, ещё от декабря 2017го (наверное, в Canonical или в сообществе руки не дошли или забили), хотя доступна только 1.3.3, а rhash-1.3.5 есть только в buster и sid... Похоже, чего-то не улавливаю в тонкостях циклов разработки?
Исправил на debhelper (>= 10), собрал, запустил тест с sha1 и sha512 - вроде порядок (Xubuntu 17.10).

adding `--exclude` option?

Hello all,

Read the manual, but didn't see this option. I believe it wasn't designed, but I could be missing something.
I'm not sure if this is already being implemented and/or in-plan for doing so, but I would like to request to have this feature added.

Thanks,

Please publish the GPG key used for signing

While git tags as well as the uploaded release archives appear to be signed, nowhere do you declare your GPG key so that packagers and users can actually make sure the key is in fact trusted. Preferably this would be listed in a separate location, e.g. the homepage at http://rhash.anz.ru/ (does not have SSL though 😢).

Since the GPG key is not published, Arch Linux cannot add the *.asc signatures for verification of the source when building distro packages, as we cannot know which key to trust.

On the topic of GPG signing, would it be possible to sign each git commit in addition to each release tag? This can be done with git commit --gpg-sign (equivalent to git tag -s ) or made the default using the config option git config --global commit.gpgsign true (equivalent to git config --global tag.forcesignannotated true).

This would allow users to verify the current git master when building development versions. For example, the rhash-git package in the Arch User Repository would be able to verify the GPG signature of the commit used for building rhash, as soon as makepkg 5.1 is released which contains support for verifying git commits when building Arch Linux packages.

rhash-1.3.5 won't compile due to missing -lintl on Gentoo/FreeBSD

Build log:

�[32;01m * �[39;49;00mPackage:    app-crypt/rhash-1.3.5
�[32;01m * �[39;49;00mRepository: gentoo
�[32;01m * �[39;49;00mMaintainer: [email protected] [email protected],[email protected]
�[32;01m * �[39;49;00mUpstream:   https://github.com/rhash/RHash/issues
�[32;01m * �[39;49;00mUSE:        abi_x86_64 amd64-fbsd elibc_FreeBSD kernel_FreeBSD nls userland_BSD
�[32;01m * �[39;49;00mFEATURES:   preserve-libs userpriv
>>> Unpacking source...
>>> Unpacking rhash-1.3.5-src.tar.gz to /var/tmp/portage/app-crypt/rhash-1.3.5/work
>>> Source unpacked in /var/tmp/portage/app-crypt/rhash-1.3.5/work
>>> Preparing source in /var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5 ...
 �[32;01m*�[0m Will copy sources from /var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5
 �[32;01m*�[0m abi_x86_64.amd64_fbsd: copying to /var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5-abi_x86_64.amd64_fbsd
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5 ...
 �[32;01m*�[0m abi_x86_64.amd64_fbsd: running multilib-minimal_abi_src_configure
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5 ...
 �[32;01m*�[0m abi_x86_64.amd64_fbsd: running multilib-minimal_abi_src_compile
gmake -j4 'CFLAGS=-O2 -pipe -mtune=generic' LDFLAGS= CC=clang 'ADDCFLAGS=-DNDEBUG -DUSE_GETTEXT' ADDLDFLAGS= PREFIX=/usr LIBDIR=$(PREFIX)/lib build-shared 
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations calc_sums.c -o calc_sums.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_print.c -o hash_print.o
echo "#define VERSION \"1.3.5\"" > version.h
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_update.c -o hash_update.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_mask.c -o file_mask.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_set.c -o file_set.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations find_file.c -o find_file.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_check.c -o hash_check.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations output.c -o output.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations parse_cmdline.c -o parse_cmdline.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash_main.c -o rhash_main.o
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations win_utils.c -o win_utils.o
gmake -C librhash lib-shared
gmake[1]: Entering directory `/var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5-abi_x86_64.amd64_fbsd/librhash'
sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/  \1;/p; $s/.*/local: *; };/p' rhash.h rhash_torrent.h rhash_timing.h > exports.sym
clang -c -pipe -O2 -pipe -mtune=generic -DNDEBUG -DUSE_GETTEXT -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations common_func.c -o common_func.o
clang -fpic  -pipe -DIN_RHASH -DNDEBUG -DUSE_GETTEXT -O2 -pipe -mtune=generic -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations -shared algorithms.c byte_order.c plug_openssl.c rhash.c rhash_timing.c rhash_torrent.c aich.c crc32.c ed2k.c edonr.c hex.c md4.c md5.c sha1.c sha256.c sha512.c sha3.c ripemd-160.c gost.c has160.c snefru.c tiger.c tiger_sbox.c tth.c torrent.c whirlpool.c whirlpool_sbox.c -Wl,--version-script,exports.sym,-soname,librhash.so.0   -o librhash.so.0
rm -f librhash.so
ln -s librhash.so.0 librhash.so
gmake[1]: Leaving directory `/var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5-abi_x86_64.amd64_fbsd/librhash'
clang calc_sums.o hash_print.o common_func.o hash_update.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o   -o rhash_shared librhash/librhash.so.0
calc_sums.o: In function `rename_file_by_embeding_crc32':
calc_sums.c:(.text+0xbf): undefined reference to `libintl_gettext'
calc_sums.c:(.text+0x2d1): undefined reference to `libintl_gettext'
calc_sums.o: In function `save_torrent_to':
calc_sums.c:(.text+0x516): undefined reference to `libintl_gettext'
calc_sums.o: In function `check_hash_file':
calc_sums.c:(.text+0xc8b): undefined reference to `libintl_gettext'
calc_sums.c:(.text+0xd01): undefined reference to `libintl_gettext'
calc_sums.o:calc_sums.c:(.text+0x1124): more undefined references to `libintl_gettext' follow
rhash_main.o: In function `main':
rhash_main.c:(.text+0x113): undefined reference to `libintl_bindtextdomain'
rhash_main.c:(.text+0x11d): undefined reference to `libintl_textdomain'
rhash_main.c:(.text+0x180): undefined reference to `libintl_gettext'
rhash_main.c:(.text+0x1d9): undefined reference to `libintl_gettext'
rhash_main.c:(.text+0x1ed): undefined reference to `libintl_gettext'
rhash_main.c:(.text+0x2b8): undefined reference to `libintl_gettext'
rhash_main.c:(.text+0x2f8): undefined reference to `libintl_gettext'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [rhash_shared] Error 1
 �[31;01m*�[0m ERROR: app-crypt/rhash-1.3.5::gentoo failed (compile phase):
 �[31;01m*�[0m   emake failed
 �[31;01m*�[0m 
 �[31;01m*�[0m If you need support, post the output of `emerge --info '=app-crypt/rhash-1.3.5::gentoo'`,
 �[31;01m*�[0m the complete build log and the output of `emerge -pqv '=app-crypt/rhash-1.3.5::gentoo'`.
 �[31;01m*�[0m The complete build log is located at '/var/tmp/portage/app-crypt/rhash-1.3.5/temp/build.log'.
 �[31;01m*�[0m The ebuild environment file is located at '/var/tmp/portage/app-crypt/rhash-1.3.5/temp/environment'.
 �[31;01m*�[0m Working directory: '/var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5-abi_x86_64.amd64_fbsd'
 �[31;01m*�[0m S: '/var/tmp/portage/app-crypt/rhash-1.3.5/work/RHash-1.3.5'

Building with make ADDLDFLAGS="-lintl" works.

Compile errors

For some reason, I sometimes will get a compile error with Rhash. Using the configure script, I something get a message about "Device or resource" busy and than I get errors about linking to GetText. that was attempting that configure script "fix"

==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Checking for target OS ... MINGW32
Checking for cc version ... 7.3.0
Checking for linker support for -static ... yes
Checking for linker support for --version-script ... yes
Checking for linker support for --nxcompat --no-seh --dynamicbase ... yes
Checking for gettext ... ./configure: line 286: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 321: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
found
Checking for OpenSSL ... ./configure: line 310: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 312: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 312: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 312: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 312: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 312: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
./configure: line 315: /tmp/rhash-configure-29544-80132/tmp.c: Device or resource busy
runtime
Checking for sources ... RHash 1.3.5
Writing config.mak
Writing librhash/config.mak
Writing dist/librhash.pc
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations calc_sums.c -o calc_sums.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_print.c -o hash_print.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations common_func.c -o common_func.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_update.c -o hash_update.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_mask.c -o file_mask.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_set.c -o file_set.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations find_file.c -o find_file.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_check.c -o hash_check.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations output.c -o output.o
cc -c -DSYSCONFDIR="/mingw32/etc" -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations parse_cmdline.c -o parse_cmdline.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash_main.c -o rhash_main.o
cc -c -DUSE_GETTEXT -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations win_utils.c -o win_utils.o
cd librhash && make lib-shared
cd librhash && make lib-static
make[1]: Entering directory '/home/jpmugaas/exp/mingw-w64-rhash-git/src/build-i686/librhash'
sed -ne '1s/./{ global:/p; s/^RHASH_API. (rhash_[a-z0-9_])(./ \1;/p; $s/.*/local: *; };/p' rhash.h rhash_torrent.h > exports.sym
cc -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations -DRHASH_EXPORTS algorithms.c byte_order.c plug_openssl.c rhash.c rhash_timing.c rhash_torrent.c aich.c crc32.c ed2k.c edonr.c hex.c md4.c md5.c sha1.c sha256.c sha512.c sha3.c ripemd-160.c gost.c has160.c snefru.c tiger.c tiger_sbox.c tth.c torrent.c whirlpool.c whirlpool_sbox.c -Wl,--nxcompat,--no-seh,--dynamicbase -shared -Wl,--out-implib=librhash.dll.a,--version-script,exports.sym,--output-def,librhash.def -o librhash.dll
make[1]: Entering directory '/home/jpmugaas/exp/mingw-w64-rhash-git/src/build-i686/librhash'
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations algorithms.c -o algorithms.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations byte_order.c -o byte_order.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations plug_openssl.c -o plug_openssl.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash.c -o rhash.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash_timing.c -o rhash_timing.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash_torrent.c -o rhash_torrent.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations aich.c -o aich.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations crc32.c -o crc32.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations ed2k.c -o ed2k.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations edonr.c -o edonr.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hex.c -o hex.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations md4.c -o md4.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations md5.c -o md5.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha1.c -o sha1.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha256.c -o sha256.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha512.c -o sha512.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha3.c -o sha3.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations ripemd-160.c -o ripemd-160.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations gost.c -o gost.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations has160.c -o has160.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations snefru.c -o snefru.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tiger.c -o tiger.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tiger_sbox.c -o tiger_sbox.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tth.c -o tth.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations torrent.c -o torrent.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations whirlpool.c -o whirlpool.o
cc -c -DOPENSSL_RUNTIME -O2 -pipe -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations whirlpool_sbox.c -o whirlpool_sbox.o
ar cqs librhash.a algorithms.o byte_order.o plug_openssl.o rhash.o rhash_timing.o rhash_torrent.o aich.o crc32.o ed2k.o edonr.o hex.o md4.o md5.o sha1.o sha256.o sha512.o sha3.o ripemd-160.o gost.o has160.o snefru.o tiger.o tiger_sbox.o tth.o torrent.o whirlpool.o whirlpool_sbox.o
make[1]: Leaving directory '/home/jpmugaas/exp/mingw-w64-rhash-git/src/build-i686/librhash'
make[1]: Leaving directory '/home/jpmugaas/exp/mingw-w64-rhash-git/src/build-i686/librhash'
cc calc_sums.o hash_print.o common_func.o hash_update.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o librhash/librhash.dll -Wl,--nxcompat,--no-seh,--dynamicbase -o rhash.exe
calc_sums.o:calc_sums.c:(.text$rename_file_by_embeding_crc32+0x194): undefined reference to libintl_gettext' calc_sums.o:calc_sums.c:(.text$rename_file_by_embeding_crc32+0x212): undefined reference to libintl_gettext'
calc_sums.o:calc_sums.c:(.text$save_torrent_to+0x106): undefined reference to libintl_gettext' calc_sums.o:calc_sums.c:(.text$check_hash_file+0xd2): undefined reference to libintl_gettext'
calc_sums.o:calc_sums.c:(.text$check_hash_file+0x5ee): undefined reference to libintl_gettext' calc_sums.o:calc_sums.c:(.text$check_hash_file+0x63d): more undefined references to libintl_gettext' follow
parse_cmdline.o:parse_cmdline.c:(.text$print_help+0x24): undefined reference to libintl_sprintf' parse_cmdline.o:parse_cmdline.c:(.text$print_help+0x30): undefined reference to libintl_gettext'
parse_cmdline.o:parse_cmdline.c:(.text$print_help+0x65): undefined reference to libintl_gettext' parse_cmdline.o:parse_cmdline.c:(.text$print_help+0x82): undefined reference to libintl_gettext'
parse_cmdline.o:parse_cmdline.c:(.text$print_help+0xaf): undefined reference to libintl_gettext' parse_cmdline.o:parse_cmdline.c:(.text$print_help+0xdc): undefined reference to libintl_gettext'
parse_cmdline.o:parse_cmdline.c:(.text$print_help+0x109): more undefined references to libintl_gettext' follow parse_cmdline.o:parse_cmdline.c:(.text$print_version+0x24): undefined reference to libintl_sprintf'
parse_cmdline.o:parse_cmdline.c:(.text$read_options+0x3e8): undefined reference to libintl_gettext' parse_cmdline.o:parse_cmdline.c:(.text$read_options+0x463): undefined reference to libintl_gettext'
parse_cmdline.o:parse_cmdline.c:(.text$read_options+0x812): undefined reference to libintl_gettext' parse_cmdline.o:parse_cmdline.c:(.text$read_options+0x8f8): undefined reference to libintl_gettext'
parse_cmdline.o:parse_cmdline.c:(.text$read_options+0xa98): undefined reference to libintl_gettext' rhash_main.o:rhash_main.c:(.text$load_printf_template+0xfb): more undefined references to libintl_gettext' follow
rhash_main.o:rhash_main.c:(.text.startup.main+0x7a): undefined reference to libintl_setlocale' rhash_main.o:rhash_main.c:(.text.startup.main+0x8e): undefined reference to libintl_bindtextdomain'
rhash_main.o:rhash_main.c:(.text.startup.main+0x9f): undefined reference to libintl_textdomain' rhash_main.o:rhash_main.c:(.text.startup.main+0x132): undefined reference to libintl_gettext'
rhash_main.o:rhash_main.c:(.text.startup.main+0x32b): undefined reference to libintl_gettext' rhash_main.o:rhash_main.c:(.text.startup.main+0x368): undefined reference to libintl_gettext'
rhash_main.o:rhash_main.c:(.text.startup.main+0x413): undefined reference to libintl_gettext' win_utils.o:win_utils.c:(.text$setup_console+0x34): undefined reference to libintl_setlocale'
win_utils.o:win_utils.c:(.text$setup_console+0x96): undefined reference to libintl_bind_textdomain_codeset' win_utils.o:win_utils.c:(.text$setup_locale_dir+0xeb): undefined reference to libintl_bindtextdomain'
win_utils.o:win_utils.c:(.text$win_vfprintf+0x58): undefined reference to libintl_vsnprintf' win_utils.o:win_utils.c:(.text$win_vfprintf+0xb4): undefined reference to libintl_vfprintf'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:158: rhash.exe] Error 1

Feature Request: Store hash in extended attributes (similar to store hash in filename)

Extended attributes seem to be an ideal location to store hashes.

A hash can be stored like:

setfattr -n user.checksum.md5 -v "18c5342a060056b76ecea66bad47960c" test.txt

And retrieved with:

getfattr -n user.checksum.md5 test.txt

To me it seems much cleaner than storing it in the filename, and especially for moved/copied files, it is easier to verify hashes again (the SFV files need to be edited when the path has changed).

[FIXED] Обработка длинного пути

Запускаю

rhash --sha1 -o openserver.sha1 -r D:\OpenServer

Со временем начинают сыпаться ошибки вроде этой

RHash: D:\OpenServer\domains\localhost\content\someday\sandbox\vendor\symfony\src\Symfony\Bundle\DoctrineMongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle\Resources\config\doctrine\metadata\mongodb\Fixtures.Bundles.XmlBundle.Document.Test.xml: No such file or directory

На этом же месте падает консольная Exf, а вот OpenSFV отрабатывает нормально.

Using -r when updating does not search sub directories.

I'm wondering if I'm missing something or is this just a limitation of the update command?
If anyone has a workaround please post it.

Issue: Using -r with -u will not search sub directories.

This is working great and finds all files in all sub directories as expected.
Creating: "rhash -r * -M --sfv -o hash.md5"

When trying to update hash.md5 RHash only finds new files in the starting directory.
Updating: "rhash -r -u hash.md5 -M --sfv"

Any help would be appreciated. :)

Build error with mingw32/msys using gcc 6.3.0

Error:

win_utils.c:506:39: error: '_TRUNCATE' undeclared (first use in this function)
Int res = vsnprintf_s(buffer, 8192, _TRUNCATE, format, args);

I had to solve another definition issue also, but I can't even start to guess what _TRUNCATE should define as.

Magnets and utility functions in bindings

All bindings should make use of rhash_print_magnet function. Additionally it would be nice to have convenient functions that return magnets/hashes directly from file/message argument. Documentation should be updated to reflect these changes. Magnet tests would also be nice.

Progress:

  • Mono
  • Java update docs
  • Perl
  • Python
  • Ruby docs?

Verify integrity from .torrent?

Hello!

If I have the files from a torrent. And I have the .torrent file. With RHash, is it able to read the .torrent file to verify all the files are good?

Thanks!

[RESEARCH] SHA3, Keccak?

В интернете в лоб нашлись первый и второй онлайн-калькуляторы SHA3.
Посчитаем хэш 224-бита для текста 1.

f3af0c2e122cb4d87350c0888092f2015eb6131ff2e9dd6893cc7645 №1 noname
300d01f3a910045fefa16d6a149f38167b2503dbc37c1b24fd6f751e №2a SHA3-224
f3af0c2e122cb4d87350c0888092f2015eb6131ff2e9dd6893cc7645 №2b Keccak-224
300d01f3a910045fefa16d6a149f38167b2503dbc37c1b24fd6f751e RHash --sha3-224

Как видите, Алексей, часть результатов совпадает, а имена разнятся.
Подскажите, пожалуйста, что же всё-таки SHA3, а что Keccak? Чего держаться, за чем будущее?

install a symlink for librhash.so.0

Please add a symlink librhash.so to librhash.so.0 on target "install".

Most linux distributions do not add a symlink for this. But cmake needs rhash since 3.8.0 which will be statically linked because it cannot find a "librhash.so" file.

[FIXED] SFV без даты и прочих атрибутов

Сейчас лишь ключ --sfv даёт классический вывод, а именно

D:\OpenServer\Open Server x64.exe 100C69E7

Однако перед этим он увеличивает вывод с 2 раза за счёт комментариев, а именно

; 8753152  15:26.47 2016-06-26 D:\OpenServer\Open Server x64.exe

Хотелось бы возможность вывести без комментариев.

Two separate results of hash

I have tried to get hash result using several hash algorithms using your program but I get two separate messages as follow:
./rhash -H --md5 trukrip
trukrip a5516e26c5c8f4c7248b94eddae57f57 f890d4a6533c995107bacd97f71f894131f45569

Could you tell me which one is the hash results? And what does the another message mean?

Thanks

BTIH is incorrect

rhash is a great tool, don't get me wrong, but the --btih output is not the correct infohash bencoded in the .torrent metadata. If users want the correct BT info hash, they should use e.g. the Transmission CLI, specifically the binary "transmission-show":

$ transmission-show /path/to/file.torrent | grep "Hash: " | awk '{print $2}'

ключ --simple

Добрый день.
rhash -M testfile
сумма /ev_locker/testfile

rhash -M --simple testfile
всёравно:
сумма /ev_locker/testfile вместо ожидаемого: "сумма testfile"
Возможно я неверно понимаю значение ключа --simple?
MacOS Sierra.
Удачи.

rhash.c:448]: (error) Resource leak: fd

Source code is

if ((fd = fopen(filepath, "rb")) == NULL) return -1;

if ((ctx = rhash_init(hash_id)) == NULL) return -1;

Suggest add call to fclose( fd) inside last if.

PHP binding build error with PHP 7.0

Here is my build log.

[root@localhost php]# phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
[root@localhost php]# ls
acinclude.m4 build config.m4 configure.in Makefile.global php_rhash.c tests
aclocal.m4 config.guess config.sub install-sh missing php_rhash.h
autom4te.cache config.h.in configure ltmain.sh mkinstalldirs run-tests.php
[root@localhost php]# ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for RHash support... yes, shared
checking for RHash in default path... found in /usr
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[root@localhost php]# ls -al
总用量 1772
drwxr-xr-x 7 root root 4096 7月 20 19:26 .
drwxr-xr-x 8 root root 4096 7月 20 19:25 ..
-rw-r--r-- 1 root root 82479 7月 20 19:26 acinclude.m4
-rw-r--r-- 1 root root 392504 7月 20 19:26 aclocal.m4
drwxr-xr-x 2 root root 4096 7月 20 19:26 autom4te.cache
drwxr-xr-x 2 root root 4096 7月 20 19:26 build
-rwxr-xr-x 1 root root 42938 7月 20 19:26 config.guess
-rw-r--r-- 1 root root 1888 7月 20 19:26 config.h
-rw-r--r-- 1 root root 1750 7月 20 19:26 config.h.in
-rw-r--r-- 1 root root 20670 7月 20 19:26 config.log
-rw-r--r-- 1 root root 1086 7月 20 19:25 config.m4
-rwxr-xr-x 1 root root 58 7月 20 19:26 config.nice
-rwxr-xr-x 1 root root 49208 7月 20 19:26 config.status
-rwxr-xr-x 1 root root 35987 7月 20 19:26 config.sub
-rwxr-xr-x 1 root root 402466 7月 20 19:26 configure
-rw-r--r-- 1 root root 4698 7月 20 19:26 configure.in
-rw-r--r-- 1 root root 0 7月 20 19:26 .deps
drwxr-xr-x 2 root root 4096 7月 20 19:26 include
-rw-r--r-- 1 root root 0 7月 20 19:26 install-sh
-rwxr-xr-x 1 root root 293052 7月 20 19:26 libtool
-rw-r--r-- 1 root root 283474 7月 20 19:26 ltmain.sh
-rw-r--r-- 1 root root 9147 7月 20 19:26 Makefile
-rw-r--r-- 1 root root 0 7月 20 19:26 Makefile.fragments
-rw-r--r-- 1 root root 7236 7月 20 19:26 Makefile.global
-rw-r--r-- 1 root root 607 7月 20 19:26 Makefile.objects
-rw-r--r-- 1 root root 0 7月 20 19:26 missing
-rw-r--r-- 1 root root 0 7月 20 19:26 mkinstalldirs
drwxr-xr-x 2 root root 4096 7月 20 19:26 modules
-rw-r--r-- 1 root root 18216 7月 20 19:25 php_rhash.c
-rw-r--r-- 1 root root 815 7月 20 19:25 php_rhash.h
-rw-r--r-- 1 root root 82956 7月 20 19:26 run-tests.php
drwxr-xr-x 2 root root 4096 7月 20 19:25 tests
[root@localhost php]# make
/bin/sh /root/RHash/bindings/php/libtool --mode=compile cc -I. -I/root/RHash/bindings/php -DPHP_ATOM_INC -I/root/RHash/bindings/php/include -I/root/RHash/bindings/php/main -I/root/RHash/bindings/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/RHash/bindings/php/php_rhash.c -o php_rhash.lo
libtool: compile: cc -I. -I/root/RHash/bindings/php -DPHP_ATOM_INC -I/root/RHash/bindings/php/include -I/root/RHash/bindings/php/main -I/root/RHash/bindings/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/RHash/bindings/php/php_rhash.c -fPIC -DPIC -o .libs/php_rhash.o

/root/RHash/bindings/php/php_rhash.c:145:1: error: unknown type name 'zend_object_value'
 static zend_object_value rhash_create_handler(zend_class_entry *type TSRMLS_DC);
 ^
/root/RHash/bindings/php/php_rhash.c: In function 'zm_startup_rhash':
/root/RHash/bindings/php/php_rhash.c:184:26: warning: assignment from incompatible pointer type [enabled by default]
  rhash_ce->create_object = rhash_create_handler;
                          ^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_get_name':
/root/RHash/bindings/php/php_rhash.c:278:52: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING(rhash_get_name((unsigned)hash_id), 1);
                                                    ^
/root/RHash/bindings/php/php_rhash.c:278:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING(rhash_get_name((unsigned)hash_id), 1);
  ^
/root/RHash/bindings/php/php_rhash.c:278:2: note: each undeclared identifier is reported only once for each function it appears in
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_msg':
/root/RHash/bindings/php/php_rhash.c:305:34: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
  RETURN_STRINGL(buffer, length, 1);
                                  ^
/root/RHash/bindings/php/php_rhash.c:305:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
  RETURN_STRINGL(buffer, length, 1);
  ^
/root/RHash/bindings/php/php_rhash.c: In function '_php_rhash_stream':
/root/RHash/bindings/php/php_rhash.c:313:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
                       ^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_file':
/root/RHash/bindings/php/php_rhash.c:378:41: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
  RETURN_STRINGL(buffer, buffer_length, 1);
                                         ^
/root/RHash/bindings/php/php_rhash.c:378:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
  RETURN_STRINGL(buffer, buffer_length, 1);
  ^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_magnet':
/root/RHash/bindings/php/php_rhash.c:412:43: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
  RETURN_STRINGL(buffer, buffer_size - 1, 0);
                                           ^
/root/RHash/bindings/php/php_rhash.c:412:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
  RETURN_STRINGL(buffer, buffer_size - 1, 0);
  ^
/root/RHash/bindings/php/php_rhash.c: At top level:
/root/RHash/bindings/php/php_rhash.c:428:1: error: unknown type name 'zend_object_value'
 static zend_object_value rhash_create_handler(zend_class_entry *class_type TSRMLS_DC)
 ^
/root/RHash/bindings/php/php_rhash.c: In function 'rhash_create_handler':
/root/RHash/bindings/php/php_rhash.c:431:2: error: unknown type name 'zend_object_value'
  zend_object_value retval;
  ^
/root/RHash/bindings/php/php_rhash.c:446:8: error: request for member 'handle' in something not a structure or union
  retval.handle = zend_objects_store_put(obj, NULL,
        ^
/root/RHash/bindings/php/php_rhash.c:447:3: warning: passing argument 1 of 'zend_objects_store_put' from incompatible pointer type [enabled by default]
   rhash_free_storage, NULL TSRMLS_CC);
   ^
In file included from /usr/include/php/Zend/zend_globals.h:35:0,
                 from /usr/include/php/Zend/zend_compile.h:657,
                 from /usr/include/php/Zend/zend_modules.h:26,
                 from /usr/include/php/Zend/zend_API.h:27,
                 from /usr/include/php/main/php.h:39,
                 from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_objects_API.h:58:15: note: expected 'struct zend_object *' but argument is of type 'struct rhash_object *'
 ZEND_API void zend_objects_store_put(zend_object *object);
               ^
/root/RHash/bindings/php/php_rhash.c:447:3: error: too many arguments to function 'zend_objects_store_put'
   rhash_free_storage, NULL TSRMLS_CC);
   ^
In file included from /usr/include/php/Zend/zend_globals.h:35:0,
                 from /usr/include/php/Zend/zend_compile.h:657,
                 from /usr/include/php/Zend/zend_modules.h:26,
                 from /usr/include/php/Zend/zend_API.h:27,
                 from /usr/include/php/main/php.h:39,
                 from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_objects_API.h:58:15: note: declared here
 ZEND_API void zend_objects_store_put(zend_object *object);
               ^
/root/RHash/bindings/php/php_rhash.c:448:8: error: request for member 'handlers' in something not a structure or union
  retval.handlers = &rhash_object_handlers;
        ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash___construct':
/root/RHash/bindings/php/php_rhash.c:471:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
        ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_update':
/root/RHash/bindings/php/php_rhash.c:483:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_update_stream':
/root/RHash/bindings/php/php_rhash.c:506:2: warning: passing argument 1 of 'zend_fetch_resource2_ex' from incompatible pointer type [enabled by default]
  php_stream_from_zval_no_verify(stream, &handle);
  ^
In file included from /usr/include/php/Zend/zend_API.h:28:0,
                 from /usr/include/php/main/php.h:39,
                 from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_list.h:66:16: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void *zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type, int resource_type2);
                ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_final':
/root/RHash/bindings/php/php_rhash.c:533:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_reset':
/root/RHash/bindings/php/php_rhash.c:546:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_hashed_length':
/root/RHash/bindings/php/php_rhash.c:558:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c: In function '_php_get_hash':
/root/RHash/bindings/php/php_rhash.c:571:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c:577:34: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
  RETURN_STRINGL(buffer, length, 1)
                                  ^
/root/RHash/bindings/php/php_rhash.c:577:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
  RETURN_STRINGL(buffer, length, 1)
  ^
/root/RHash/bindings/php/php_rhash.c:578:1: error: expected ';' before '}' token
 }
 ^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_magnet':
/root/RHash/bindings/php/php_rhash.c:629:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
                      ^
/root/RHash/bindings/php/php_rhash.c:641:40: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
  RETURN_STRINGL(buffer, buf_size - 1, 0);
                                        ^
/root/RHash/bindings/php/php_rhash.c:641:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
  RETURN_STRINGL(buffer, buf_size - 1, 0);
  ^
make: *** [php_rhash.lo] 错误 1

[root@localhost php]#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.