Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

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 :)

@Scvairy

This comment has been minimized.

Copy link

@Scvairy Scvairy commented Oct 15, 2018

$ make
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in m4
make[2]: Nothing to be done for all'. Making all in intl make[2]: Nothing to be done for all'.
Making all in po
rm -f es.gmo && : -c --statistics -o es.gmo es.po
mv: rename t-es.gmo to es.gmo: No such file or directory
make[2]: *** [es.gmo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@RpCoding

This comment has been minimized.

Copy link

@RpCoding RpCoding commented Nov 3, 2018

@Scvairy brew link gettext --force helped me to solve this.

@FreddieOliveira

This comment has been minimized.

Copy link

@FreddieOliveira FreddieOliveira commented Dec 31, 2018

Thanks mate. It worked for me. Didn't need to run brew link gettext --force as suggested by @RpCoding, just followed the original tutorial.
@Scvairy, suggest you to delete the directory, clone it again and follow the steps since the beginning

@b4dc0d3d

This comment has been minimized.

Copy link

@b4dc0d3d b4dc0d3d commented Mar 27, 2019

Hi! I'm trying to compile it on OSX 10.9.5. I have installed mcrypt and mhash via brew. Also symlinked both into /usr/lib and /usr/local/opt and still getting this error when trying to configure.

**********
libmcrypt could not be found on your system. Steghide will be compiled without
support for encryption. You will not be able to extract encrypted data!
libmcrypt can be downloaded from http://mcrypt.sourceforge.net/
**********
**********
libmhash could not be found on your system but is needed to compile steghide.
libmhash can be downloaded from http://mhash.sourceforge.net/.
**********
configure: error: libmhash not found

Where should those libraries supposed to be?

Thanks a lot!

@Jason-Ko

This comment has been minimized.

Copy link

@Jason-Ko Jason-Ko commented Jun 1, 2019

I've also tried to install StegHide on OSX and I'm running into issues, mainly when compiling files in the /po directory, has anyone else had success with compiling it with the above method?

@care

This comment has been minimized.

Copy link

@care care commented Jun 18, 2019

@Jason-Ko I've also been trying to compile Steghide on OSX but no success :/ it was throwing me errors even after I've followed everything in the tutorial.

@evandrix

This comment has been minimized.

@QuentaSim

This comment has been minimized.

Copy link

@QuentaSim QuentaSim commented Mar 24, 2020

$ patch --verbose -p0 < steghide-0.5.1/steghide-gcc.patch zsh: no such file or directory: steghide-0.5.1/steghide-gcc.patch

Also

diff -u src/Makefile.old src/Makefile diff: src/Makefile.old: No such file or directory

@louisr133

This comment has been minimized.

Copy link

@louisr133 louisr133 commented Jun 14, 2020

I literally ran into every issue on this page, so I'm going to clarify.

1.) Download steghide from their website and save it somewhere you'll remember. Make sure it's the 0.5.1 version. steghide-0.5.1

First error I got when I ran ./configure was similar to the one mentioned by @b4dc0d3d.

**********
libmcrypt could not be found on your system. Steghide will be compiled without
support for encryption. You will not be able to extract encrypted data!
libmcrypt can be downloaded from http://mcrypt.sourceforge.net/
**********
**********
libmhash could not be found on your system but is needed to compile steghide.
libmhash can be downloaded from http://mhash.sourceforge.net/.
**********
configure: error: libmhash not found

If you get this error, please go to the specified links in the error (e.g. http://mcrypt.sourceforge.net/, http://mhash.sourceforge.net/ ... etc ) and download the files. cd into the folder you just downloaded and run
$ ./configure && make && make check && sudo make install. Do this for each of the ones you download.
cd back into your steghide folder and run the ./configure command again. It should run without errors.
After this follow the steps above.

Fixing the diff: src/Makefile.old: No such file or directory error @QuentaSim got.

When you get to

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

cd into steghide-0.5.1/ before running wget command, then go back one directory (i.e cd ../) and run the patch command.

The whole thing should look similar to

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

please remember to change /place/you/downloaded/...

Fixing diff: src/Makefile.old: No such file or directory error.

When I got to diff -u src/Makefile.old src/Makefile, I kept getting thediff: src/Makefile.old: No such file or directory error
I couldn't figure out how to get it to work, so I ended up not using that command.
Instead, I cd-ed into the /steghide-0.5.1/src, and change it manually with nano (i.e. nano Makefile ).
This should open a little text-like box in your terminal with a bunch of stuff. Looking at the original instructions, replace everything in red with everything in green inside your Makefile, while in nano.

Once you have changed them, save the file using control-x, press y to confirm changes, and hit enter to keep the file name the same.

Now you can run make in your steghide-0.5.1/ directory and it should work.
I really hope this helps someone out there.

@nella17

This comment has been minimized.

Copy link

@nella17 nella17 commented Jun 26, 2020

Error when make after patch.

image

@sulph68

This comment has been minimized.

Copy link

@sulph68 sulph68 commented Jun 27, 2020

use brew to install libtool
$ brew install libtool

that will give you glibtool. the fixes above would then work.

@nella17

This comment has been minimized.

Copy link

@nella17 nella17 commented Jun 27, 2020

@sulph68 Thanks, but my mac already install libtool.

@jrmullins

This comment has been minimized.

Copy link

@jrmullins jrmullins commented Aug 28, 2020

@sulph68 Thanks, but my mac already install libtool.
make sure you are editing src/Makefile and not Makefile

@DyuldinKS

This comment has been minimized.

Copy link

@DyuldinKS DyuldinKS commented Oct 22, 2020

Thank you, this works perfectly.

@MatthewBoyle

This comment has been minimized.

Copy link

@MatthewBoyle MatthewBoyle commented Nov 2, 2020

"make check" is revealing a lot of problems with the system tests. Is anyone else running into these?

systemtests

@camillegroult

This comment has been minimized.

Copy link

@camillegroult camillegroult commented Dec 21, 2020

Hello world

Disipe all you're advice steghide (last version) is not working using High Sierra; but is working good when I install and configure this version :
MacBook-Pro:steghide Apple$ steghide
steghide version 0.4.3

Enjoy

Error when make after patch.

image

Hello world

Disipe all you're advice steghide (last version) is not working using High Sierra; but is working good when I install and configure this version :
MacBook-Pro:steghide Apple$ steghide
steghide version 0.4.3

Enjoy

@camillegroult

This comment has been minimized.

Copy link

@camillegroult camillegroult commented Dec 21, 2020

Hey excuse me all
can someone can help me to solve this issue ?

steghide: the file format of the file "/Users/Apple/Desktop/edkMac2/img/core-img/logo.png" is not supported.

camillegroult ;)

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