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

Building under Ubuntu 12.04 (32-bit) - Error Messages #8

Closed
jeremysolarz opened this issue Apr 13, 2013 · 11 comments
Closed

Building under Ubuntu 12.04 (32-bit) - Error Messages #8

jeremysolarz opened this issue Apr 13, 2013 · 11 comments

Comments

@jeremysolarz
Copy link

@jeremysolarz jeremysolarz commented Apr 13, 2013

I build pwntcha like os

./bootstrap
./configure
./make

Get the following error after make

make[3]: Entering directory `/home/user/pwntcha/src'
gcc `sdl-config --cflags` -Wall -O6 -g -O2 `sdl-config --libs` -lSDL_image  -o pwntcha pwntcha-main.o pwntcha-filter.o pwntcha-font.o pwntcha-image.o pwntcha-easter-eggs.o pwntcha-test.o authimage/libdecoder.a clubic/libdecoder.a htmlformguide/libdecoder.a java/libdecoder.a linuxfr/libdecoder.a livejournal/libdecoder.a lmt/libdecoder.a movabletype/libdecoder.a paypal/libdecoder.a phpbb/libdecoder.a scode/libdecoder.a slashdot/libdecoder.a ticketmaster/libdecoder.a tickets/libdecoder.a vbulletin/libdecoder.a xanga/libdecoder.a 
pwntcha-image.o: In function `image_new':
/home/user/pwntcha/src/image.c:98: undefined reference to `SDL_CreateRGBSurface'
pwntcha-image.o: In function `image_load':
/home/user/pwntcha/src/image.c:35: undefined reference to `IMG_Load'
/home/user/pwntcha/src/image.c:49: undefined reference to `SDL_UpperBlit'
/home/user/pwntcha/src/image.c:50: undefined reference to `SDL_FreeSurface'
pwntcha-image.o: In function `image_free':
/home/user/pwntcha/src/image.c:155: undefined reference to `SDL_FreeSurface'
pwntcha-image.o: In function `image_save':
/home/user/pwntcha/src/image.c:171: undefined reference to `SDL_RWFromFile'
/home/user/pwntcha/src/image.c:171: undefined reference to `SDL_SaveBMP_RW'
livejournal/libdecoder.a(libdecoder_a-decoder.o): In function `find_glyphs':
/home/user/pwntcha/src/livejournal/decoder.c:88: undefined reference to `sqrt'
slashdot/libdecoder.a(libdecoder_a-decoder.o): In function `rotate':
/home/user/pwntcha/src/slashdot/decoder.c:146: undefined reference to `sqrt'
/home/user/pwntcha/src/slashdot/decoder.c:147: undefined reference to `sqrt'
xanga/libdecoder.a(libdecoder_a-decoder.o): In function `find_glyphs':
/home/user/pwntcha/src/xanga/decoder.c:173: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make[3]: *** [pwntcha] Error 1
make[3]: Leaving directory `/home/user/pwntcha/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/pwntcha/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/pwntcha'
make: *** [all] Error 2

output of configure is

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
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 size_t... yes
checking for getopt_long... yes
checking IL/il.h usability... yes
checking IL/il.h presence... yes
checking for IL/il.h... yes
checking olectl.h usability... no
checking olectl.h presence... no
checking for olectl.h... no
checking for sdl-config... /usr/bin/sdl-config
checking SDL_image.h usability... yes
checking SDL_image.h presence... yes
checking for SDL_image.h... yes
checking cv.h usability... yes
checking cv.h presence... yes
checking for cv.h... yes
checking for imlib2-config... /usr/bin/imlib2-config
checking Imlib2.h usability... yes
checking Imlib2.h presence... yes
checking for Imlib2.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/authimage/Makefile
config.status: creating src/clubic/Makefile
config.status: creating src/htmlformguide/Makefile
config.status: creating src/java/Makefile
config.status: creating src/linuxfr/Makefile
config.status: creating src/livejournal/Makefile
config.status: creating src/lmt/Makefile
config.status: creating src/movabletype/Makefile
config.status: creating src/paypal/Makefile
config.status: creating src/phpbb/Makefile
config.status: creating src/scode/Makefile
config.status: creating src/slashdot/Makefile
config.status: creating src/ticketmaster/Makefile
config.status: creating src/tickets/Makefile
config.status: creating src/vbulletin/Makefile
config.status: creating src/xanga/Makefile
config.status: creating extras/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

so the dependencies seem fine.

Any hint what could be the reason for this?

@s35300792001
Copy link

@s35300792001 s35300792001 commented May 21, 2013

I have the same problem as you.

@iveney
Copy link
Owner

@iveney iveney commented Jun 10, 2013

I don't have a Ubuntu box at hand and cannot test. Looks like the new GCC in your system deprecated implicit declaration of sqrt etc. functions. Try to include the math header <math.h> in the reported files (decoder.c etc.) and recompile. Please fork and send a pull request.

@samsemilia7
Copy link

@samsemilia7 samsemilia7 commented Jun 30, 2013

To solve that problem you should try the following steps:

  • run :
    ./bootstrap
    ./configure
  • change into pwntcha/src
  • run make till the error occurs
  • then run the following command:
    g++ sdl-config --cflags -Wall -O6 -g -O2 -o pwntcha pwntcha-main.o pwntcha-filter.o pwntcha-font.o pwntcha-image.o pwntcha-easter-eggs.o pwntcha-test.o authimage/libdecoder.a clubic/libdecoder.a java/libdecoder.a linuxfr/libdecoder.a livejournal/libdecoder.a lmt/libdecoder.a paypal/libdecoder.a phpbb/libdecoder.a scode/libdecoder.a slashdot/libdecoder.a ticketmaster/libdecoder.a tickets/libdecoder.a vbulletin/libdecoder.a xanga/libdecoder.a sdl-config --libs -lSDL_image

The command is mostly the same, except for the compiler (used g++) and the compiler flags are at the end.
After that, you will have your executable :D ( Tested on a ubuntu 12.04, 64bit).

@kelonye
Copy link

@kelonye kelonye commented Sep 29, 2013

getting configure.ac:5: option tar-ustar' not recognized on fedora when ./bootstrap

@samsemilia7
Copy link

@samsemilia7 samsemilia7 commented Sep 29, 2013

maybe there is a space missing. try changing the line to tar -ustar

@kelonye
Copy link

@kelonye kelonye commented Sep 29, 2013

@samsemilia7 maybe tar-ustar option isn't in automakev1.7 and below.

@djg123
Copy link

@djg123 djg123 commented Oct 28, 2013

@samsemilia7 I am getting

/usr/bin/ld: cannot find -lSDL_image
collect2: ld returned 1 exit status
@iveney
Copy link
Owner

@iveney iveney commented Oct 28, 2013

That means you need to have SDL_image library installed.

On Mon, Oct 28, 2013 at 8:23 AM, djyale notifications@github.com wrote:

@samsemilia7 https://github.com/samsemilia7 I am getting

/usr/bin/ld: cannot find -lSDL_image
collect2: ld returned 1 exit status


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-27210540
.

Regards,
Zigang Xiao,
Department of Electrical and Computer and Engineering,
University of Illinois at Urbana-Champaign
http://ews.illinois.edu/~zxiao2

@rostfrei
Copy link

@rostfrei rostfrei commented Nov 11, 2013

Managed to build pwntcha in cygwin!

So I have done exactly what samsemilia7 told to do, but in my case I use imlib2 so I run

g++ imlib2-config --cflags -Wall -O6 -g -O2 -o pwntcha pwntcha-main.o pwntcha-filter.o pwntcha-font.o pwntcha-image.o pwntcha-easter-eggs.o pwntcha-test.o authimage/libdecoder.a clubic/libdecoder.a java/libdecoder.a linuxfr/libdecoder.a livejournal/libdecoder.a lmt/libdecoder.a paypal/libdecoder.a phpbb/libdecoder.a scode/libdecoder.a slashdot/libdecoder.a ticketmaster/libdecoder.a tickets/libdecoder.a vbulletin/libdecoder.a xanga/libdecoder.a imlib2-config --libs -lImlib2

and I got the error

$ g++ imlib2-config --cflags -Wall -O6 -g -O2 -o pwntcha pwntcha-main.o pwntcha-filter.o pwntcha-font.o pwntcha-image.o pwntcha-easter-eggs.o pwntcha-test.o authimage/libdecoder.a clubic/libdecoder.a java/libdecoder.a linuxfr/libdecoder.a livejournal/libdecoder.a lmt/libdecoder.a paypal/libdecoder.a phpbb/libdecoder.a scode/libdecoder.a slashdot/libdecoder.a ticketmaster/libdecoder.a tickets/libdecoder.a vbulletin/libdecoder.a xanga/libdecoder.a imlib2-config --libs -lImlib2
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lfreetype
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lz
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lbz2
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status

after installing the missing libraries and running the command again, pwntcha.exe was successfully created.

@iveney iveney closed this Nov 13, 2013
@micfan
Copy link

@micfan micfan commented Feb 15, 2014

@jeremysolarz I have the same problem as you, now. OS: ubuntu12.04. I think cywin is not proper for development, but i can't transfer it to Linux

@2called-chaos
Copy link

@2called-chaos 2called-chaos commented Oct 17, 2014

With your help I was able to build it on 14.04 as well, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.