Skip to content

Instantly share code, notes, and snippets.

@ruevaughn
Forked from cedriczirtacic/steghide.md
Created May 3, 2022 12:53
Show Gist options
  • Save ruevaughn/eafb9629fedd31faef34af1a5e78efd9 to your computer and use it in GitHub Desktop.
Save ruevaughn/eafb9629fedd31faef34af1a5e78efd9 to your computer and use it in GitHub Desktop.

Compile steghide in macOS X

Check if gettext is installed, if not use Homebrew to get it:

$ brew install gettext

Get the gettext library and cpp flags, and configure with those flags:

$ brew info gettext | grep FLAGS
LDFLAGS:  -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
$ LDFLAGS=-L/usr/local/opt/gettext/lib CPPFLAGS=-I/usr/local/opt/gettext/include ./configure 

Apply this patch:

$ wget -q https://github.com/sabotage-linux/sabotage/raw/master/KEEP/steghide-gcc.patch
$ patch --verbose -p0  < steghide-0.5.1/steghide-gcc.patch

And this other patch to use glibtool and specify the --tag flag:

$ diff -u src/Makefile.old src/Makefile
--- src/Makefile.old	2018-08-06 19:03:10.000000000 -0600
+++ src/Makefile	2018-08-06 19:05:29.000000000 -0600
@@ -106,7 +106,7 @@
 POSUB = po
 RANLIB = ranlib
 SET_MAKE = 
-SHELL = /bin/sh
+SHELL = /bin/bash
 STRIP = 
 USE_INCLUDED_LIBINTL = no
 USE_INTLDIR_FALSE = 
@@ -190,7 +190,7 @@
 WavPCMSampleValue.cc error.cc main.cc msg.cc SMDConstructionHeuristic.cc
 
 localedir = $(datadir)/locale
-LIBTOOL = $(SHELL) libtool
+LIBTOOL = $(SHELL) glibtool --tag CXX
 MAINTAINERCLEANFILES = Makefile.in
 subdir = src
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

Then make :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment