Closed whit2333 closed 9 years ago
Did you install the ffmpeg related dependencies?
sudo apt-get install build-essential libpng12-dev libjpeg-dev \ libfreetype6-dev libgif-dev ragel libavformat-dev libavcodec-dev \ libswscale-dev
On Wed, Apr 10, 2013 at 8:27 PM, Whitney Armstrong <notifications@github.com
wrote:
$ make g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o hiptext.o hiptext.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o artiste.o artiste.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o charquantizer.o charquantizer.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -I/usr/include/freetype2 -march=native -c -o font.o font.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o graphic.o graphic.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o jpeg.o jpeg.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o macterm.o macterm.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o movie.o movie.cc movie.cc: In destructor ‘Movie::~Movie()’: movie.cc:42:48: error: ‘avformat_closeinput’ was not declared in this scope if (format) avformat_closeinput(&format); ^ make: *\ [movie.o] Error 1
— Reply to this email directly or view it on GitHubhttps://github.com/jart/hiptext/issues/14 .
After commenting out the offending line above, I get the following runtime errors:
$ ./hiptext balls.png * Aborted at 1365639931 (unix time) try "date -d @1365639931" if you are using GNU date * PC: @ 0x805992e LoadPNG() * SIGSEGV (@0x0) received by PID 29713 (TID 0xb5be86d0) from PID 0; stack trace: * @ 0xb777940c (unknown) Segmentation fault
$ ./hiptext obama.jpg * Aborted at 1365639943 (unix time) try "date -d @1365639943" if you are using GNU date * PC: @ 0x804f9c0 Graphic::BilinearScale() * SIGSEGV (@0x0) received by PID 29715 (TID 0xb5c166d0) from PID 0; stack trace: * @ 0xb77a740c (unknown) @ 0xb669aca6 (unknown) @ 0x804aecd (unknown) Segmentation fault
Yes all dependencies are installed.
What system are you running?
On Wed, Apr 10, 2013 at 8:32 PM, Whitney Armstrong <notifications@github.com
wrote:
Yes all dependencies are installed.
— Reply to this email directly or view it on GitHubhttps://github.com/jart/hiptext/issues/14#issuecomment-16210865 .
I am using debian and I just built gcc 4.8.0
Not sure if this helps...
$ make test
g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native gtest-1.6.0/src/gtest-all.o gtest-1.6.0/src/gtest_main.o pixel_test.o xterm256_test.o artiste.o charquantizer.o font.o graphic.o jpeg.o macterm.o movie.o pixel.o pixel_parse.o png.o termprinter.o unicode.o xterm256.o -lm -lglog -lgflags -lpng -ljpeg -lavcodec -lavformat -lavutil -lswscale -lfreetype -lz -lpthread -o test
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information.
artiste.o: In function Artiste::PrintMovie(Movie)': artiste.cc:(.text+0x54b): undefined reference to
g_done'
collect2: error: ld returned 1 exit status
make: *\ [test] Error 1
You seem to be getting an incredibly diverse assortment of errors which leads me to believe there isn't one specific bug in the code. Sadly I'm not really able to reproduce this because compiling gcc 4.8 myself would be no easy task. Could you try troubleshooting this a bit more? Maybe try getting rid of some of the compiler flags and see if it works. If you want to give up, there are many private debian repositories with gcc 4.7. Clang is also relatively easy to compile
On Wed, Apr 10, 2013 at 8:52 PM, Whitney Armstrong <notifications@github.com
wrote:
Not sure if this helps...
$ make test g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native gtest-1.6.0/src/gtest-all.o gtest-1.6.0/src/gtest_main.o pixel_test.o xterm256_test.o artiste.o charquantizer.o font.o graphic.o jpeg.o macterm.o movie.o pixel.o pixel_parse.o png.o termprinter.o unicode.o xterm256.o -lm -lglog -lgflags -lpng -ljpeg -lavcodec -lavformat -lavutil -lswscale -lfreetype -lz -lpthread -o test /usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information. artiste.o: In function Artiste::PrintMovie(Movie)': artiste.cc:(.text+0x54b): undefined reference tog_done' collect2: error: ld returned 1 exit status make: *\ [test] Error 1
— Reply to this email directly or view it on GitHubhttps://github.com/jart/hiptext/issues/14#issuecomment-16211449 .
hmmm... I installed gcc 4.7 and all the dependencies from debian unstable but I get the same problems.
Try this:
make clean CXX=g++-4.8 make -j4
On Wed, Apr 10, 2013 at 11:58 PM, Whitney Armstrong < notifications@github.com> wrote:
hmmm... I installed gcc 4.7 and all the dependencies from debian unstable but I get the same problems.
— Reply to this email directly or view it on GitHubhttps://github.com/jart/hiptext/issues/14#issuecomment-16215805 .
Not to dig up an old issue, but I have run into the same exact runtime errors (with LoadPNG() and BilinearScale()). I did not have the initial error posted during compilation. I tried first on ubuntu 12.04 after adding a ppa to go from g++-4.6 to 4.7. I then tried again on 13.10 which comes with g++-4.8 as the stock option. Both setups yielded identical errors at runtime.
Would you guys mind taking another look? Everything builds fine for me on:
master jart@gothpad:~/hiptext$ g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
And:
master jart@gothpad:~/hiptext$ $CXX --version
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
Just tried to build on my new machine. Works fine! Nice job.
Hooray!
$ make g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o hiptext.o hiptext.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o artiste.o artiste.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o charquantizer.o charquantizer.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -I/usr/include/freetype2 -march=native -c -o font.o font.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o graphic.o graphic.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o jpeg.o jpeg.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o macterm.o macterm.cc g++ -g -O3 -std=c++11 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -MD -march=native -c -o movie.o movie.cc movie.cc: In destructor ‘Movie::~Movie()’: movie.cc:42:48: error: ‘avformat_closeinput’ was not declared in this scope if (format) avformat_closeinput(&format); ^ make: *\ [movie.o] Error 1