Bug 215184 - security/hashcat-legacy: hard-coded gcc can cause build failure
Summary: security/hashcat-legacy: hard-coded gcc can cause build failure
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Nikolai Lifanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-09 22:33 UTC by John Hein
Modified: 2016-12-15 14:27 UTC (History)
2 users (show)

See Also:
lifanov: maintainer-feedback+


Attachments
[patch] use ports infrastructure's definition of CC (430 bytes, patch)
2016-12-09 23:50 UTC, John Hein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2016-12-09 22:33:40 UTC
If you have lang/gccXY installed, but not lang/gcc, currently there is no /usr/local/bin/gcc.  If you are on FreeBSD 10 or later, there is also no /usr/bin/gcc by default.  But the hashcat-legacy-2.00/src/Makefile hard-codes the compiler to gcc (or some other spellings if you're cross-compiling to windows for instance) instead of referring to ${CC} that the ports infrastructure defines.

The result:

===>   hashcat-legacy-2.00_1 depends on executable: gmake - found
===>   Returning to build of hashcat-legacy-2.00_1
===>   hashcat-legacy-2.00_1 depends on executable: gcc46 - found
===>   hashcat-legacy-2.00_1 depends on file: /usr/local/bin/as - found
===>   hashcat-legacy-2.00_1 depends on shared library: libgmp.so - found (/usr/local/lib/libgmp.so)
===>  Configuring for hashcat-legacy-2.00_1
===>  Building for hashcat-legacy-2.00_1
gmake[1]: Entering directory '/wrkdirs/usr/ports/security/hashcat-legacy/work/hashcat-legacy-2.00'
gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/opt/hashcat-deps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/common.c -o obj/common.LINUX.64.o
gmake[1]: gcc: Command not found
gmake[1]: *** [src/Makefile:190: obj/common.LINUX.64.o] Error 127
gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/hashcat-legacy/work/hashcat-legacy-2.00'
*** Error code 1
Comment 1 John Hein 2016-12-09 23:50:27 UTC
Created attachment 177836 [details]
[patch] use ports infrastructure's definition of CC

The attached patch uses what the ports infrastructure comes up with for CC rather than the hard-coded gcc.

QA:
  portlint - ok
  stage-qa - ok
  poudriere - ok (10-stable/64)

I don't know yet if security/hashcat has the same issue.  If so, I'll open a separate bug.
Comment 2 Nikolai Lifanov 2016-12-10 14:01:12 UTC
Huh, you're right... USE_GCC always installed "gcc" in poudriere, so I didn't catch this. I tested the patch and approve.
Comment 3 Nikolai Lifanov 2016-12-10 14:01:29 UTC
The newer hashcat doesn't USE_GCC.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-12-15 14:19:37 UTC
A commit references this bug:

Author: lifanov
Date: Thu Dec 15 14:18:41 UTC 2016
New revision: 428617
URL: https://svnweb.freebsd.org/changeset/ports/428617

Log:
  security/hashcat-legacy: fix if lang/gccXX is installed and lang/gcc is not

  PR:		215184
  Submitted by:	John Hein
  Reported by:	John Hein
  Reviewed by:	matthew
  Approved by:	matthew (mentor)
  Differential Revision:	https://reviews.freebsd.org/D8798

Changes:
  head/security/hashcat-legacy/Makefile
Comment 5 Nikolai Lifanov freebsd_committer freebsd_triage 2016-12-15 14:27:18 UTC
Committed, thanks!