Skip to content
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

No rule to make target '/opt/win-iconv-64/lib/libiconv.a' #2253

Closed
jdoles opened this issue Dec 19, 2019 · 4 comments
Closed

No rule to make target '/opt/win-iconv-64/lib/libiconv.a' #2253

jdoles opened this issue Dec 19, 2019 · 4 comments

Comments

@jdoles
Copy link

jdoles commented Dec 19, 2019

Admittedly, this may be my own ignorance. When building from source for Windows I get the following error:
make: *** No rule to make target '/opt/win-iconv-64/lib/libiconv.a', needed by 'hashcat.exe'. Stop.

OS: Ubuntu 18.04

I cloned the repo per the guide. Then I installed mingw-64 and win-iconv-mingw-w64-dev. Next I ran make win. I'm not sure where to go on this error though.

@philsmd
Copy link
Member

philsmd commented Dec 19, 2019

hey.
cross-compiling is something very specific and special and the average user won't and probably shouldn't do it.
There is some kind of "documentation" in the source/Makefile for iconv on windows:

hashcat/src/Makefile

Lines 556 to 561 in be38eef

## To compile win-iconv with mingw clone from here: https://github.com/win-iconv/win-iconv
##
## Then patch the makefile with the patches from tools/win-iconv-64.diff and run make install
##
WIN_ICONV := /opt/win-iconv-64

i.e. clone that repo mentioned and put it under that specific path ("/opt/win-iconv-64/")... you would also need to patch it with tools/win-iconv-64.diff

I'm not sure if we should add extra documentation for this... it should be kinda rare that users want to cross-compile binaries (execept for the developers that need to ship all the different kind of binaries, linux and windows).

If this helps and you think it's good AS-IS, don't forget to close the issue :)

@jdoles
Copy link
Author

jdoles commented Dec 19, 2019

Thanks for the quick reply. The reason I started down this path was to get the latest code for testing. Also I might be a glutton for punishment. ;) Anyhow -

I was able to get this to build without errors. I didn't find it too difficult personally. Here's an overview of what I did:
-- Clone repo
sudo git clone https://github.com/win-iconv/win-iconv

-- Move directory to /opt/win-iconv-64/
sudo mv /opt/win-iconv/ /opt/win-iconv-64/

-- Patch the Makefile with the one provided by hashcat
sudo patch /opt/win-iconv-64/Makefile -i ~/hashcat/tools/win-iconv-64.diff

-- Make win-iconv
sudo make

-- Move the lib files to where hashcat expects them
sudo mkdir /opt/win-iconv-64/lib
sudo cp /opt/win-iconv-64/lib* /opt/win-iconv-64/lib/

-- Make hashcat
sudo make
sudo make win

It probably wouldn't hurt to add something like this to the BUILD.md file. Given the simple make win reference, I thought this would be easier. ;)

@jsteube
Copy link
Member

jsteube commented Dec 19, 2019

If you are on windows just install MinGW or CygWin and run make.

@jdoles
Copy link
Author

jdoles commented Dec 19, 2019

If you are on windows just install MinGW or CygWin and run make.

That's an option too I suppose. On the system I was testing on I didn't have the ability to run either. So I was getting around that by compiling on a Linux VM I had.

Thanks for the input.

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

No branches or pull requests

3 participants