GithubHelp home page GithubHelp logo

Comments (7)

selsta avatar selsta commented on May 24, 2024

Really not sure what’s going on, all these errors are in library files that should be okay.

from hlsdl.

selsta avatar selsta commented on May 24, 2024

Closing due to no answer. If this still happens, create a new issue please.

from hlsdl.

Reino17 avatar Reino17 commented on May 24, 2024

No answer to what? Where's the question?

from hlsdl.

selsta avatar selsta commented on May 24, 2024

Oops, sorry.

from hlsdl.

Reino17 avatar Reino17 commented on May 24, 2024

Getting back at this, in 'makefile' I noticed:

CC?=gcc
PREFIX?=/usr/local

Since I'm cross-compiling I had to do:

make "CC=/cygdrive/m/ffmpeg-windows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_co
mpilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc PREFIX=/cygdrive/m/ffmpeg-windows-build-helpe
rs-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32"

That solved the initial issue, but then I got:

/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc src/main.o src/aes.o src/curl.o src/hls.o src/misc
.o src/msg.o -L/cygdrive/m/[...]/i686-w64-mingw32/lib -lcurl -lavformat [...] -ladvapi32 -o h
lsdl
/cygdrive/m/[...]/i686-w64-mingw32/lib/libcurl.a(libcurl_la-ldap.o):ldap.c:(.text+0x158): und
efined reference to `_imp__ldap_err2string'
[...]
/cygdrive/m/[...]/i686-w64-mingw32/lib/libcurl.a(libcurl_la-ldap.o):ldap.c:(.text+0xf34): und
efined reference to `_imp__ldap_memfree'
collect2: error: ld returned 1 exit status
make: *** [makefile:25: all] Error 1

In the end I solved that by updating 'makefile' a bit:

diff --git a/makefile b/makefile
index 30f9465..5962b7c 100644
--- a/makefile
+++ b/makefile
@@ -13,7 +13,7 @@ CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual
 CFLAGS+=-Wsign-compare -Iincludes -g
 CFLAGS+=-DPREFIX='"$(PREFIX)"'
 CFLAGS+=$(shell $(PKGCONFIG) --cflags)
-LDFLAGS=$(shell $(PKGCONFIG) --libs)
+LDFLAGS=$(shell $(PKGCONFIG) --static --libs)

 OSNAME=$(shell uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z)
 ifeq ("$(OSNAME)", "linux")

Why? Because...

$ pkg-config --static --libs libcurl
-L/cygdrive/m/[...]/i686-w64-mingw32/lib -lcurl -lnettle -lgnutls -lws2_32 -lgmp -lcrypt32 -l
hogweed -lgmp -lnettle -lwldap32 -lz -lws2_32

also returns libcurl's private libs, unlike...

$ pkg-config --libs libcurl
-L/cygdrive/m/[...]/i686-w64-mingw32/lib -lcurl

from hlsdl.

Reino17 avatar Reino17 commented on May 24, 2024

And in case you're eager to fix warnings:

/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -march=pentium3 -O2 -mfpmath=sse -msse -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -Iincludes -g -DPREFIX='"/cygdrive/m/[...]/i686-w64-mingw32"' -DCURL_STATICLIB -I/cygdrive/m/[...]/i686-w64-mingw32/include -c src/main.c -o src/main.o
src/main.c: In function 'main':
src/main.c:25:5: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations]
     av_register_all();
     ^~~~~~~~~~~~~~~
In file included from src/main.c:1:0:
/cygdrive/m/[...]/i686-w64-mingw32/include/libavformat/avformat.h:2025:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -march=pentium3 -O2 -mfpmath=sse -msse -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -Iincludes -g -DPREFIX='"/cygdrive/m/[...]/i686-w64-mingw32"' -DCURL_STATICLIB -I/cygdrive/m/[...]/i686-w64-mingw32/include -c src/aes.c -o src/aes.o
src/aes.c: In function 'AES128_CBC_encrypt_buffer':
src/aes.c:492:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
     Iv = (uint8_t*)iv;
          ^
src/aes.c:495:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i = 0; i < length; i += KEYLEN)
                ^
src/aes.c: In function 'AES128_CBC_decrypt_buffer':
src/aes.c:533:10: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
     Iv = (uint8_t*)iv;
          ^
src/aes.c:536:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i = 0; i < length; i += KEYLEN)
                ^
/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -march=pentium3 -O2 -mfpmath=sse -msse -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -Iincludes -g -DPREFIX='"/cygdrive/m/[...]/i686-w64-mingw32"' -DCURL_STATICLIB -I/cygdrive/m/[...]/i686-w64-mingw32/include -c src/hls.c -o src/hls.o
src/hls.c: In function 'decrypt_sample_aes':
src/hls.c:418:5: warning: 'codec' is deprecated [-Wdeprecated-declarations]
     ofmt_ctx->streams[audio_idx]->codec->frame_size = audio_frame_size;
     ^~~~~~~~
In file included from src/hls.c:1:0:
/cygdrive/m/[...]/i686-w64-mingw32/include/libavformat/avformat.h:877:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
src/hls.c:489:21: warning: implicit declaration of function 'memmem'; did you mean 'memset'? [-Wimplicit-function-declaration]
                 p = memmem(p, (end - p), h264_nal_init, 3);
                     ^~~~~~
                     memset
src/hls.c:489:19: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 p = memmem(p, (end - p), h264_nal_init, 3);
                   ^
src/hls.c:493:25: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                 nal_end = memmem(p + 3, (end - (p + 3)), h264_nal_init, 3);
                         ^
src/hls.c:505:37: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                         while ((tmp = memmem(tmp, nal_end - tmp,
                                     ^
src/hls.c:518:29: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
                     nal_end = memmem(p, (end - p), h264_nal_init, 3);
                             ^

from hlsdl.

selsta avatar selsta commented on May 24, 2024

Hi, thanks! I’ll update the makefile.

from hlsdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.