dinhminhquoi / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

building libvpx-v1.3.0 with mingw and msys #703

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Am attempting to build libvpx-v1.3.0 with MinGW (4.7.2) using msys.  I ran 
configure, and then attempted to run make.

make fails at 
    $(if $(quiet),@echo "    [STRIP] $@ < $<")
    $(qexec)$(STRIP) --strip-unneeded \
         `$(NM) $< | grep ' [A-TV-Z] ' |  grep -v '.*dump_statistics.*' | awk '{print "-K"$$3'}`\
          -o $@ $<

The error is as follows:
/bin/sh: /mingw/bin/strip: Bad file number
make[1]: *** [libvpx.a] Error 126
make: *** [.DEFAULT] Error 2

I tried removing the following line:
         `$(NM) $< | grep ' [A-TV-Z] ' |  grep -v '.*dump_statistics.*' 
| awk '{print "-K"$$3'}`\

I can then get to the point where it attempts to link test_libvpx.exe.  The 
link fails.  

There are several undefined references to strtok_s in svc_encodeframe.c.o.  
MinGW has does not have strtok_s as part of its standard library.  It's 
possible MinGW-w64 has added the function, but MinGW (www.mingw.org), the 
original Minimalist GNU Windows compiler, does not have it.  Thus, the program 
fails to build with MinGW.  It would be nice if you added an alternative for 
systems that do not support strtok_s or strtok_r.

Original issue reported on code.google.com by lme...@gmail.com on 5 Feb 2014 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by renganat...@google.com on 27 Feb 2014 at 11:29

GoogleCodeExporter commented 9 years ago
Same experience here. Below is the fragment of output,
[Very new to this world. Just downloaded WebM libraries and tried compiling 
using MingW32]

    [CXX] test/vp9_subtract_test.cc.o
    [CXX] test/vp9_thread_test.cc.o
    [LD] test_libvpx.exe
./libvpx.a(svc_encodeframe.c.o):(.text+0x165): undefined reference to `strtok_s'

./libvpx.a(svc_encodeframe.c.o):(.text+0x1bc): undefined reference to `strtok_s'

./libvpx.a(svc_encodeframe.c.o):(.text+0x317): undefined reference to `strtok_s'

./libvpx.a(svc_encodeframe.c.o):(.text+0x3b9): undefined reference to `strtok_s'

./libvpx.a(svc_encodeframe.c.o):(.text+0x7a5): undefined reference to `strtok_s'

./libvpx.a(svc_encodeframe.c.o):(.text+0x825): more undefined references to `str
tok_s' follow
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ./libvpx.a
(svc_encodeframe.c.o): bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [test_libvpx.exe] Error 1
make: *** [.DEFAULT] Error 2

Original comment by sou...@gmail.com on 5 Nov 2014 at 12:22

GoogleCodeExporter commented 9 years ago
If you're trying to build webm with MinGW, the previous version I tried does 
build successfully and work.  Believe it's still available from 
https://libwebm.webm.googlecode.com/archive/e369bed31999a3314feb7d5ba0903d6f2290
b45e.zip  It's just the 1.3.0 version that I've had no luck with.  Hope future 
versions are designed to be more cross-platform portable.

Original comment by lme...@gmail.com on 7 Nov 2014 at 11:56

GoogleCodeExporter commented 9 years ago
v1.3.0 is ancient. Please try HEAD, and if the problem remains open a new issue.

Original comment by tomfine...@google.com on 7 Nov 2014 at 6:16

GoogleCodeExporter commented 9 years ago

Original comment by tomfine...@google.com on 7 Nov 2014 at 6:17