Discussion:
Libav compilation issue on Windows phone 8.1
(too old to reply)
Mirko Puliafito
2014-09-12 10:07:17 UTC
Permalink
I was able to compile static libav libs on Windows phone 8.1 but not able
to link them to create an app.

I used these steps:

*My configuration*
-) OS: Windows 8.1 VS: Ultimate 2013 Update 3 (If armasm fails,
msvcdis110.dll missing download it from dllsearch )
-) Mingw (be sure that "link" and "cl" commands point to MS "link" and
"cl")
-) Libav 10.3

Follow prerequisites listed here:
https://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows

-) Download c99toc89: https://github.com/libav/c99-to-c89/downloads/. Be
sure all files from c99toc89 are in Mingw PATH (copy in /bin)

-) FFMPEG requires stdint.h and inttypes.h headers standardized as a part
of C99. Unfortunately, Visual Studio does not include these files.
Fortunately, there is a project that fixes this issue. Download the latest
version and unpack it to Visual Studio includes (C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\include).

-) Launch cmd and "c:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\vcvarsall.bat x86_arm" and then msys

-) configure:
./configure --toolchain=msvc \
--disable-programs \
--disable-network \
--disable-protocols \
--extra-cflags="-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPI_FAMILY=WINAPIFAMILY_APP" \
--enable-cross-compile \
--target-os=win32 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--disable-yasm \
--extra-ldflags="-MACHINE:ARM" \
--disable-dxva2 \
--disable-asm \
--disable-docI was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.

Anyone?
Luca Barbato
2014-09-12 13:11:58 UTC
Permalink
On 12/09/14 12:07, Mirko Puliafito wrote:

Are they the same as?

https://libav.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows

Libav and FFmpeg are different projects, I'll add a section to
http://wiki.libav.org/Platform once I'll have some time to nag Martin
about it.
Post by Mirko Puliafito
I was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.
The fate instances seem running fine

https://fate.libav.org/?compiler=Microsoft&arch=arm

https://fate.libav.org/arm-msvc-11-winrt-gaspp/20140911094703

lu
Mirko Puliafito
2014-09-12 13:18:27 UTC
Permalink
Yes, a kind of the same, just some tuning about armasm.

Compilation is fine also with me. The problem is when I try to link libs in
an ARM Visual Studio Project (Windows Phone app).

Mirko
Post by Luca Barbato
Are they the same as?
https://libav.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
Libav and FFmpeg are different projects, I'll add a section to
http://wiki.libav.org/Platform once I'll have some time to nag Martin
about it.
Post by Mirko Puliafito
I was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.
The fate instances seem running fine
https://fate.libav.org/?compiler=Microsoft&arch=arm
https://fate.libav.org/arm-msvc-11-winrt-gaspp/20140911094703
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Timothy Gu
2014-09-12 13:26:01 UTC
Permalink
Post by Mirko Puliafito
Yes, a kind of the same, just some tuning about armasm.
Compilation is fine also with me. The problem is when I try to link libs in
an ARM Visual Studio Project (Windows Phone app).
Can you posted the log of the failed build here so we can pinpoint the
problem?

Timothy
Luca Barbato
2014-09-12 13:33:19 UTC
Permalink
Post by Mirko Puliafito
Yes, a kind of the same, just some tuning about armasm.
No, if you use Libav you get support here, if you use FFmpeg you have to
ask it in the right ml.

It is quite rude asking questions and have people spend time on
something while you are using the competing project.

lu
Mirko Puliafito
2014-09-12 13:43:24 UTC
Permalink
@Luca: I'm trying both ffmpeg and libav getting the same error. It seems
both have the same linking error (or I'm screwing up J). I'm using libav
10.3 just downloaded from the official libav site

@Timothy:

------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
It seems that libcmt.lib is not standarly added. Adding it I get:

------ Rebuild All started: Project: TestFFMPEG, Configuration: Release ARM
------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
Generating code
Finished generating code
XamlTypeInfo.g.cpp
libavcodec.a(vp8.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavutil.a(log.o) : error LNK2001: unresolved external symbol getenv
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetStdHandle
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetConsoleScreenBufferInfo
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_SetConsoleTextAttribute
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptAcquireContextA
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptReleaseContext
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptGenRandom
libavutil.a(cpu.o) : error LNK2001: unresolved external symbol
__imp_GetProcessAffinityMask
C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestFFMPEG.exe : fatal
error LNK1120: 10 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I've checked and a part of the missing symbols come from kernel32.lib that
is excluded by defaults on Windows Phone apps. I've also tried to use your
guide:
https://libav.org/platform.html#Linking-to-Libav-with-Microsoft-Visual-C_002b_002b

but setting Multi Thread gives that result:

------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
C:\Program Files
error MSB8024: Using static version of the C++ runtime library is not
supported.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I was wondering if anybody tried to use libav on a Windows 8 phone...

Mirko
Post by Mirko Puliafito
Yes, a kind of the same, just some tuning about armasm.
No, if you use Libav you get support here, if you use FFmpeg you have to
ask it in the right ml.
It is quite rude asking questions and have people spend time on
something while you are using the competing project.
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Luca Barbato
2014-09-12 13:56:24 UTC
Permalink
Post by Mirko Puliafito
@Luca: I'm trying both ffmpeg and libav getting the same error. It seems
both have the same linking error (or I'm screwing up J). I'm using libav
10.3 just downloaded from the official libav site
------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
------ Rebuild All started: Project: TestFFMPEG, Configuration: Release ARM
------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
Generating code
Finished generating code
XamlTypeInfo.g.cpp
libavcodec.a(vp8.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavutil.a(log.o) : error LNK2001: unresolved external symbol getenv
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetStdHandle
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetConsoleScreenBufferInfo
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_SetConsoleTextAttribute
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptAcquireContextA
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptReleaseContext
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptGenRandom
libavutil.a(cpu.o) : error LNK2001: unresolved external symbol
__imp_GetProcessAffinityMask
C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestFFMPEG.exe : fatal
error LNK1120: 10 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I've checked and a part of the missing symbols come from kernel32.lib that
is excluded by defaults on Windows Phone apps.
That is quite useful:

- threads support missing (what does window phone use for threads?)
- log support requires non-standard support (I have patches for android
and iOS, I can refresh them and see if we can add something window
specific while at it)
- crypto primitives seems not matching. (what does window phone use for
getting random values?)
Post by Mirko Puliafito
https://libav.org/platform.html#Linking-to-Libav-with-Microsoft-Visual-C_002b_002b
------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
C:\Program Files
error MSB8024: Using static version of the C++ runtime library is not
supported.
Check the link line used and see if could be changed to use the
shared/dynamic version of the C++ runtime.

Thanks a lot

lu
Timothy Gu
2014-09-12 14:25:40 UTC
Permalink
Post by Luca Barbato
- threads support missing (what does window phone use for threads?)
Windows Phone has CreateSemaphoreExW and other Unicode functions, but
no ANSI which Libav uses.
Post by Luca Barbato
- log support requires non-standard support
Windows Phone doesn't seem to have console operations.
Post by Luca Barbato
(I have patches for android
and iOS, I can refresh them and see if we can add something window
specific while at it)
That would be an interesting addition.
Post by Luca Barbato
- crypto primitives seems not matching. (what does window phone use for
getting random values?)
Very good question.
http://msdn.microsoft.com/en-us/library/windows/apps/jj662956(v=vs.105).aspx
does not list any crypt-releated functions.

[...]

Timothy
Mirko Puliafito
2014-09-12 15:12:22 UTC
Permalink
I can test any patch you want as I have a running development VM (It took
days to have one up and running).

Mirko
Post by Timothy Gu
Post by Luca Barbato
- threads support missing (what does window phone use for threads?)
Windows Phone has CreateSemaphoreExW and other Unicode functions, but
no ANSI which Libav uses.
Post by Luca Barbato
- log support requires non-standard support
Windows Phone doesn't seem to have console operations.
Post by Luca Barbato
(I have patches for android
and iOS, I can refresh them and see if we can add something window
specific while at it)
That would be an interesting addition.
Post by Luca Barbato
- crypto primitives seems not matching. (what does window phone use for
getting random values?)
Very good question.
http://msdn.microsoft.com/en-us/library/windows/apps/jj662956(v=vs.105).aspx
does not list any crypt-releated functions.
[...]
Timothy
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Luca Barbato
2014-09-12 16:09:49 UTC
Permalink
Post by Mirko Puliafito
I can test any patch you want as I have a running development VM (It took
days to have one up and running).
Great, I'd wait for Martin since he is the most knowledgeable person on
this field.

lu
Mirko Puliafito
2014-09-12 13:42:42 UTC
Permalink
@Luca: I'm trying both ffmpeg and libav getting the same error. It seems
both have the same linking error (or I'm screwing up J). I'm using libav
10.3 just downloaded from the official libav site

@Timothy:

------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
It seems that libcmt.lib is not standarly added. Adding it I get:

------ Rebuild All started: Project: TestFFMPEG, Configuration: Release ARM
------
pch.cpp
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(152): warning
C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible loss of
data
c:\mingw\msys\1.0\home\mirkpul\libav-10.3\libavutil\common.h(235): warning
C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t', possible loss
of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
Generating code
Finished generating code
XamlTypeInfo.g.cpp
libavcodec.a(vp8.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
__imp_CreateSemaphoreA
libavcodec.a(pthread_frame.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavcodec.a(pthread_slice.o) : error LNK2001: unresolved external symbol
_beginthreadex
libavutil.a(log.o) : error LNK2001: unresolved external symbol getenv
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetStdHandle
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_GetConsoleScreenBufferInfo
libavutil.a(log.o) : error LNK2001: unresolved external symbol
__imp_SetConsoleTextAttribute
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptAcquireContextA
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptReleaseContext
libavutil.a(random_seed.o) : error LNK2001: unresolved external symbol
__imp_CryptGenRandom
libavutil.a(cpu.o) : error LNK2001: unresolved external symbol
__imp_GetProcessAffinityMask
C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestFFMPEG.exe : fatal
error LNK1120: 10 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I've checked and a part of the missing symbols come from kernel32.lib that
is excluded by defaults on Windows Phone apps. I've also tried to use your
guide:
https://libav.org/platform.html#Linking-to-Libav-with-Microsoft-Visual-C_002b_002b

but setting Multi Thread gives that result:

------ Build started: Project: TestFFMPEG, Configuration: Release ARM ------
C:\Program Files
error MSB8024: Using static version of the C++ runtime library is not
supported.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I was wondering if anybody tried to use libav on a Windows 8 phone...

Mirko

--

*Mirko Puliafito*

CTO

Mobile: +39 347 276 0256

<http://www.eudata.biz/>
20124 Milano
Via Melchiorre Gioia 55/c
Phone:+39 02 454 950 98
Fax: +39 02 454 950 99


www.unyco.net
Post by Mirko Puliafito
Yes, a kind of the same, just some tuning about armasm.
No, if you use Libav you get support here, if you use FFmpeg you have to
ask it in the right ml.
It is quite rude asking questions and have people spend time on
something while you are using the competing project.
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Mirko Puliafito
2014-09-12 13:17:20 UTC
Permalink
Yes, a kind of the same, just some tuning about armasm.

Compilation is fine also with me. The problem is when I try to link libs in
an ARM Visual Studio Project (Windows Phone app).

Mirko

--

*Mirko Puliafito*

CTO

Mobile: +39 347 276 0256

<http://www.eudata.biz/>
20124 Milano
Via Melchiorre Gioia 55/c
Phone:+39 02 454 950 98
Fax: +39 02 454 950 99


www.unyco.net
Post by Luca Barbato
Are they the same as?
https://libav.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
Libav and FFmpeg are different projects, I'll add a section to
http://wiki.libav.org/Platform once I'll have some time to nag Martin
about it.
Post by Mirko Puliafito
I was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.
The fate instances seem running fine
https://fate.libav.org/?compiler=Microsoft&arch=arm
https://fate.libav.org/arm-msvc-11-winrt-gaspp/20140911094703
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Martin Storsjö
2014-09-14 21:54:41 UTC
Permalink
Post by Mirko Puliafito
-) Libav 10.3
Please try using the latest release instead, there's been some recent
changes to the arm assembly handling for windows phone. This is unrelated
to your current issues though, but will be needed if you try to build the
assembly code using the configure switches linked.
Post by Mirko Puliafito
https://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
-) Download c99toc89: https://github.com/libav/c99-to-c89/downloads/. Be
sure all files from c99toc89 are in Mingw PATH (copy in /bin)
-) FFMPEG requires stdint.h and inttypes.h headers standardized as a part
of C99. Unfortunately, Visual Studio does not include these files.
Visual Studio 2012 includes stdint.h but not inttypes.h - make sure you
don't overwrite the compiler provided stdint.h with a third party one.
Visual Studio 2013 provides both of them out of the box.
Post by Mirko Puliafito
Fortunately, there is a project that fixes this issue. Download the latest
version and unpack it to Visual Studio includes (C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\include).
Further up you said you used Visual Studio 2013 (which is Visual Studio
version 12) but here you're talking about version 11.
Post by Mirko Puliafito
-) Launch cmd and "c:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\vcvarsall.bat x86_arm" and then msys
./configure --toolchain=msvc \
--disable-programs \
--disable-network \
--disable-protocols \
--extra-cflags="-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPI_FAMILY=WINAPIFAMILY_APP" \
You shouldn't be defining _M_ARM, those are defines provided by the
compiler itself.
Post by Mirko Puliafito
--enable-cross-compile \
--target-os=win32 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--disable-yasm \
--extra-ldflags="-MACHINE:ARM" \
--disable-dxva2 \
--disable-asm \
--disable-doc
I was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.
Luca already pointed you to
https://fate.libav.org/arm-msvc-11-winrt-gaspp/20140911094703 which
contains a full, correct and working configure line.

Luca also told you "Check the link line used and see if could be changed
to use the shared/dynamic version of the C++ runtime." - this is the
correct and exact clue to solving your problem.

Add "-MD" to --extra-cflags and most of your issues should go away. This
makes sure the built object files try to link to msvcrt instead of libcmt
(which doesn't exist for the windows phone targets).

You should also remove the extra -D defines you have - the ones that you
really need are -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0602
(plus -MD) - as shown in the link given above. Setting this version of
-D_WIN32_WINNT makes sure the right threading functions are picked up as
well, and don't set WINAPI_FAMILY with a leading underscore. Additionally
if you're going to try to build the assembly you need -D__ARM_PCS_VFP as
well.

// Martin
Mirko Puliafito
2014-09-16 14:54:42 UTC
Permalink
Thanks for the support Martin.

I used what you suggested with the snapshot source and now I have the
following behaviours:

1) With the config from the fate I get the following configure error:

check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.wCcGmfBh.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.wCcGmfBh.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.JiBIxDvP.o
./ffconf.wCcGmfBh.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
GNU assembler not found, install/update gas-preprocessor
And the configure fails. If I disable asm "--disable-asm" configure goes on
but I get compilation error on compiling docs. After disabling docs
"disable-doc" everything works fine and I am able to compile.

2) Trying to link the compiled libs from 1) and using "/MD" on VS 2013 I'm
getting the following:

------ Rebuild All started: Project: TestLibav, Configuration: Release ARM
------
C:\Program Files
warning MSB8028: The intermediate directory (ARM\Release\) contains files
shared from another project (TestFFMPEG.vcxproj). This can lead to
incorrect clean and rebuild behavior.
pch.cpp
warning C4244: 'return' : conversion from 'int64_t' to 'int32_t', possible
loss of data
warning C4244: 'argument' : conversion from 'uint64_t' to 'uint32_t',
possible loss of data
App.xaml.cpp
NavigationHelper.cpp
RelayCommand.cpp
SuspensionManager.cpp
SampleDataSource.cpp
HubPage.xaml.cpp
ItemPage.xaml.cpp
SectionPage.xaml.cpp
XamlTypeInfo.Impl.g.cpp
Generating code
Finished generating code
XamlTypeInfo.g.cpp
Creating library C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestLibav.lib and object
C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestLibav.exp
libavformat.a(rtpdec.o) : error LNK2001: unresolved external symbol
__imp_gethostname
libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol
__imp_getpeername
libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol
__imp_getsockname
libavformat.a(sapenc.o) : error LNK2001: unresolved external symbol
__imp_getsockname
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_getsockname
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(sdp.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(url.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(sapenc.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol
__imp_getaddrinfo
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(sdp.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(url.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(sapenc.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol
__imp_freeaddrinfo
libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol
__imp_getnameinfo
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_getnameinfo
libavformat.a(sdp.o) : error LNK2001: unresolved external symbol
__imp_getnameinfo
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_htons
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_ntohs
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_recvfrom
libavformat.a(rtpproto.o) : error LNK2001: unresolved external symbol
__imp_sendto
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_sendto
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol
__imp_closesocket
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_closesocket
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_closesocket
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol __imp_recv
libavformat.a(udp.o) : error LNK2001: unresolved external symbol __imp_recv
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol __imp_send
libavformat.a(udp.o) : error LNK2001: unresolved external symbol __imp_send
libavformat.a(tcp.o) : error LNK2001: unresolved external symbol
__imp_shutdown
libavformat.a(udp.o) : error LNK2001: unresolved external symbol __imp_bind
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_bind
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_connect
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_connect
libavformat.a(udp.o) : error LNK2001: unresolved external symbol
__imp_setsockopt
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_setsockopt
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_accept
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_getsockopt
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_listen
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_ntohl
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_socket
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_WSAStartup
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_WSACleanup
libavformat.a(network.o) : error LNK2001: unresolved external symbol
__imp_WSAGetLastError
libavformat.a(os_support.o) : error LNK2001: unresolved external symbol
__WSAFDIsSet
libavformat.a(os_support.o) : error LNK2001: unresolved external symbol
__imp_ioctlsocket
libavformat.a(os_support.o) : error LNK2001: unresolved external symbol
__imp_htonl
libavformat.a(os_support.o) : error LNK2001: unresolved external symbol
__imp_select
C:\Users\mirkpul\documents\visual studio
2013\Projects\TestFFMPEG\ARM\Release\TestFFMPEG\TestLibav.exe : fatal error
LNK1120: 29 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
It seems a problem of winsock libs somehow. Are they supported on Windows
phone devices?

Mirko
-) Libav 10.3
Please try using the latest release instead, there's been some recent
changes to the arm assembly handling for windows phone. This is unrelated
to your current issues though, but will be needed if you try to build the
assembly code using the configure switches linked.
Post by Mirko Puliafito
https://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_
002b-or-Intel-C_002b_002b-Compiler-for-Windows
-) Download c99toc89: https://github.com/libav/c99-to-c89/downloads/. Be
sure all files from c99toc89 are in Mingw PATH (copy in /bin)
-) FFMPEG requires stdint.h and inttypes.h headers standardized as a part
of C99. Unfortunately, Visual Studio does not include these files.
Visual Studio 2012 includes stdint.h but not inttypes.h - make sure you
don't overwrite the compiler provided stdint.h with a third party one.
Visual Studio 2013 provides both of them out of the box.
Fortunately, there is a project that fixes this issue. Download the latest
Post by Mirko Puliafito
version and unpack it to Visual Studio includes (C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\include).
Further up you said you used Visual Studio 2013 (which is Visual Studio
version 12) but here you're talking about version 11.
-) Launch cmd and "c:\Program Files (x86)\Microsoft Visual Studio
Post by Mirko Puliafito
12.0\VC\vcvarsall.bat x86_arm" and then msys
./configure --toolchain=msvc \
--disable-programs \
--disable-network \
--disable-protocols \
--extra-cflags="-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPI_FAMILY=WINAPIFAMILY_APP" \
You shouldn't be defining _M_ARM, those are defines provided by the
compiler itself.
--enable-cross-compile \
Post by Mirko Puliafito
--target-os=win32 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--disable-yasm \
--extra-ldflags="-MACHINE:ARM" \
--disable-dxva2 \
--disable-asm \
--disable-doc
I was able to get .a static libs but I wasn't able to generate
an app using it. I have problems while linking for kernel32.lib and
libcmt.lib misses.
Luca already pointed you to https://fate.libav.org/arm-
msvc-11-winrt-gaspp/20140911094703 which contains a full, correct and
working configure line.
Luca also told you "Check the link line used and see if could be changed
to use the shared/dynamic version of the C++ runtime." - this is the
correct and exact clue to solving your problem.
Add "-MD" to --extra-cflags and most of your issues should go away. This
makes sure the built object files try to link to msvcrt instead of libcmt
(which doesn't exist for the windows phone targets).
You should also remove the extra -D defines you have - the ones that you
really need are -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0602
(plus -MD) - as shown in the link given above. Setting this version of
-D_WIN32_WINNT makes sure the right threading functions are picked up as
well, and don't set WINAPI_FAMILY with a leading underscore. Additionally
if you're going to try to build the assembly you need -D__ARM_PCS_VFP as
well.
// Martin
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Martin Storsjö
2014-09-16 16:41:13 UTC
Permalink
Hi,
Post by Mirko Puliafito
Thanks for the support Martin.
I used what you suggested with the snapshot source and now I have the
check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.wCcGmfBh.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.wCcGmfBh.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.JiBIxDvP.o
./ffconf.wCcGmfBh.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
GNU assembler not found, install/update gas-preprocessor
And the configure fails.
Yes - if you want to build the assembly you need to have gas-preprocessor
installed and available in your $PATH. You can get it from
git://git.libav.org/gas-preprocessor.git
Post by Mirko Puliafito
If I disable asm "--disable-asm" configure goes on
but I get compilation error on compiling docs. After disabling docs
"disable-doc" everything works fine and I am able to compile.
Ok, that sounds good
Post by Mirko Puliafito
2) Trying to link the compiled libs from 1) and using "/MD" on VS 2013 I'm
------ Rebuild All started: Project: TestLibav, Configuration: Release ARM
------
libavformat.a(rtpdec.o) : error LNK2001: unresolved external symbol
__imp_gethostname
It seems a problem of winsock libs somehow. Are they supported on Windows
phone devices?
Yes, they are supported on Windows Phone. However, since you're using
static libraries you need manually add any other extra libs you want to
link it to. In this case, you need to add ws2_32.lib to the list of
additional dependencies within visual studio. (You can also possibly add
--disable-network to the configure line to avoid using this at all.)

Building a shared library might be more convenient though - then you don't
need to keep track of internal details like this. Using a shared library
also simplifies complying with the LGPL in case your application isn't
opensource itself.

// Martin
Mirko Puliafito
2014-09-18 11:19:35 UTC
Permalink
Adding gas-preprocessor.pl doesn't solve the configure issue:

<machine>: ARM | THUMB | ARMCE
Post by Mirko Puliafito
check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.lwhMWour.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.lwhMWour.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.oLCbjdCq.o
./ffconf.lwhMWour.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
It seems an armasm issue. If I look here:
https://ffmpegwinrtarm.codeplex.com/

They've created armasm scripts.

What do you think?

Mirko
Post by Mirko Puliafito
Hi,
Thanks for the support Martin.
Post by Mirko Puliafito
I used what you suggested with the snapshot source and now I have the
check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.wCcGmfBh.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.wCcGmfBh.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.JiBIxDvP.o
./ffconf.wCcGmfBh.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
GNU assembler not found, install/update gas-preprocessor
And the configure fails.
Yes - if you want to build the assembly you need to have gas-preprocessor
installed and available in your $PATH. You can get it from git://
git.libav.org/gas-preprocessor.git
If I disable asm "--disable-asm" configure goes on
Post by Mirko Puliafito
but I get compilation error on compiling docs. After disabling docs
"disable-doc" everything works fine and I am able to compile.
Ok, that sounds good
2) Trying to link the compiled libs from 1) and using "/MD" on VS 2013 I'm
Post by Mirko Puliafito
------ Rebuild All started: Project: TestLibav, Configuration: Release ARM
------
libavformat.a(rtpdec.o) : error LNK2001: unresolved external symbol
__imp_gethostname
It seems a problem of winsock libs somehow. Are they supported on Windows
phone devices?
Yes, they are supported on Windows Phone. However, since you're using
static libraries you need manually add any other extra libs you want to
link it to. In this case, you need to add ws2_32.lib to the list of
additional dependencies within visual studio. (You can also possibly add
--disable-network to the configure line to avoid using this at all.)
Building a shared library might be more convenient though - then you don't
need to keep track of internal details like this. Using a shared library
also simplifies complying with the LGPL in case your application isn't
opensource itself.
// Martin
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Martin Storsjö
2014-09-18 11:41:50 UTC
Permalink
Post by Mirko Puliafito
<machine>: ARM | THUMB | ARMCE
Post by Mirko Puliafito
check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.lwhMWour.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.lwhMWour.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.oLCbjdCq.o
./ffconf.lwhMWour.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
https://ffmpegwinrtarm.codeplex.com/
They've created armasm scripts.
These scripts are unrelated.

Also you didn't show the interesting part of config.log, what comes after
this. Directly after the quoted part there should be something like this:

check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm -- armasm' as AS

The error messages from this stage is what is interesting.


Also, did it work to add ws2_32.lib, to fix linking to the static library
that you built without assembly enabled? Please confirm that those parts
did help.

// Martin
Mirko Puliafito
2014-09-18 11:53:11 UTC
Permalink
Here it is:

armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_WIN32_WINNT=0x0502 -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm -- armasm' as AS
check_as
BEGIN ./ffconf.rjlVzAjm.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.rjlVzAjm.S
gas-preprocessor.pl -arch arm -as-type armasm -- armasm -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_WIN32_WINNT=0x0502
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
Error running preprocessor at /bin/gas-preprocessor.pl line 205.
GNU assembler not found, install/update gas-preprocessor
About the linking, it worked. Adding wsock2 lib solved the issue and now I
have an app invoking:

int test(){
/* Initialize libavcodec, and register all codecs and formats. */
av_register_all();
/*Initialize network */
avformat_network_init();
return 0;
}
I'm now trying with dynamic libs, let you know,

Mirko
Post by Mirko Puliafito
<machine>: ARM | THUMB | ARMCE
Post by Mirko Puliafito
check_gas using 'armasm' as AS
check_as
BEGIN ./ffconf.lwhMWour.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.lwhMWour.S
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D__ARM_PCS_VFP
-D_WIN32_WINNT=0x0602 -march=armv7-a -c -o ./ffconf.oLCbjdCq.o
./ffconf.lwhMWour.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
https://ffmpegwinrtarm.codeplex.com/
They've created armasm scripts.
These scripts are unrelated.
Also you didn't show the interesting part of config.log, what comes after
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm -- armasm' as AS
The error messages from this stage is what is interesting.
Also, did it work to add ws2_32.lib, to fix linking to the static library
that you built without assembly enabled? Please confirm that those parts
did help.
// Martin
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Martin Storsjö
2014-09-18 12:02:17 UTC
Permalink
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_WIN32_WINNT=0x0502 -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm -- armasm' as AS
check_as
BEGIN ./ffconf.rjlVzAjm.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.rjlVzAjm.S
gas-preprocessor.pl -arch arm -as-type armasm -- armasm -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_WIN32_WINNT=0x0502
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
Error running preprocessor at /bin/gas-preprocessor.pl line 205.
GNU assembler not found, install/update gas-preprocessor
I see, ok. Now I can help you further: The problem is that you need to
have some sort of C preprocessor (cpp) in the path as well. An
installation of mingw should have this (it doesn't work with only the
independent cpp.exe) - it doesn't matter that your mingw installation is
for x86, it is only used for preprocessing the assembly source files.
About the linking, it worked. Adding wsock2 lib solved the issue and now I
int test(){
/* Initialize libavcodec, and register all codecs and formats. */
av_register_all();
/*Initialize network */
avformat_network_init();
return 0;
}
I'm now trying with dynamic libs, let you know,
Ok, great.

// Martin
Mirko Puliafito
2014-09-18 16:10:10 UTC
Permalink
Post by Martin Storsjö
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_WIN32_WINNT=0x0502 -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm --
armasm'
as AS
check_as
BEGIN ./ffconf.rjlVzAjm.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.rjlVzAjm.S
gas-preprocessor.pl -arch arm -as-type armasm -- armasm -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_WIN32_WINNT=0x0502
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
Error running preprocessor at /bin/gas-preprocessor.pl line 205.
GNU assembler not found, install/update gas-preprocessor
I see, ok. Now I can help you further: The problem is that you need to
have some sort of C preprocessor (cpp) in the path as well. An installation
of mingw should have this (it doesn't work with only the independent
cpp.exe) - it doesn't matter that your mingw installation is for x86, it is
only used for preprocessing the assembly source files.
My fault, I haven't added Mingw bin to my path. This also solved
"--disable-doc" issue.
Post by Martin Storsjö
About the linking, it worked. Adding wsock2 lib solved the issue and now I
int test(){
/* Initialize libavcodec, and register all codecs and formats. */
av_register_all();
/*Initialize network */
avformat_network_init();
return 0;
}
I'm now trying with dynamic libs, let you know,
Ok, great.
It works with dynamic compilation without importing wsock.

What about writing a guide on Windows 8 ARM compilation. I have taken some
notes about the whole process.

What do you think?

Mirko
Post by Martin Storsjö
// Martin
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Martin Storsjö
2014-09-18 16:20:22 UTC
Permalink
Post by Mirko Puliafito
Post by Martin Storsjö
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_WIN32_WINNT=0x0502 -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm --
armasm'
as AS
check_as
BEGIN ./ffconf.rjlVzAjm.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.rjlVzAjm.S
gas-preprocessor.pl -arch arm -as-type armasm -- armasm -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_WIN32_WINNT=0x0502
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o ./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
Error running preprocessor at /bin/gas-preprocessor.pl line 205.
GNU assembler not found, install/update gas-preprocessor
I see, ok. Now I can help you further: The problem is that you need to
have some sort of C preprocessor (cpp) in the path as well. An installation
of mingw should have this (it doesn't work with only the independent
cpp.exe) - it doesn't matter that your mingw installation is for x86, it is
only used for preprocessing the assembly source files.
My fault, I haven't added Mingw bin to my path. This also solved
"--disable-doc" issue.
Ok, great
Post by Mirko Puliafito
It works with dynamic compilation without importing wsock.
Ok, that's also intended and as expected
Post by Mirko Puliafito
What about writing a guide on Windows 8 ARM compilation. I have taken some
notes about the whole process.
Sure. Luca already did some basic work towards this, collecting the main
points at https://wiki.libav.org/Platform/WindowsPhone, but the points you
might need to add are:

- If you link statically to the libav libraries, you need to manually add
any dependencies as well, such as ws2_32.lib. (This isn't in any way
specific to windows 8 or so, but is the same on all compilers and all
platforms.)

- You need gas-preprocessor for arm assembly, and you need cpp available
for gas-preprocessor for armasm

// Martin
Mirko Puliafito
2014-09-18 16:37:59 UTC
Permalink
I would also clearly expose the requirements like OS (MS needs windows 8.1
with mobile SDK 8.1), VS version and a link to the msvc toolchain on mingw
guide.

I've built libav for all the other mobile platforms (android and iOS) but
never had so many problems like the ones I had with Windows 8.

What do you think?

Mirko
Post by Martin Storsjö
Post by Mirko Puliafito
Post by Martin Storsjö
armasm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_WIN32_WINNT=0x0502 -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o
./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
error A2029: unknown command-line argument or argument value
-D_ISOC99_SOURCE
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
check_gas using 'gas-preprocessor.pl -arch arm -as-type armasm --
armasm'
as AS
check_as
BEGIN ./ffconf.rjlVzAjm.S
1 .macro m n, y:vararg=0
2 \n: .int \y
3 .endm
4 m x
END ./ffconf.rjlVzAjm.S
gas-preprocessor.pl -arch arm -as-type armasm -- armasm
-D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_WIN32_WINNT=0x0502
-Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
-D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf -nologo -ignore
4509 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -D_M_ARM
-D_WINAPIFAMILY=WINAPIFAMILY_APP -march=armv7 -c -o
./ffconf.LvqQEfNX.o
./ffconf.rjlVzAjm.S
Error running preprocessor at /bin/gas-preprocessor.pl line 205.
GNU assembler not found, install/update gas-preprocessor
I see, ok. Now I can help you further: The problem is that you need to
have some sort of C preprocessor (cpp) in the path as well. An installation
of mingw should have this (it doesn't work with only the independent
cpp.exe) - it doesn't matter that your mingw installation is for x86, it is
only used for preprocessing the assembly source files.
My fault, I haven't added Mingw bin to my path. This also solved
"--disable-doc" issue.
Ok, great
It works with dynamic compilation without importing wsock.
Ok, that's also intended and as expected
What about writing a guide on Windows 8 ARM compilation. I have taken some
Post by Mirko Puliafito
notes about the whole process.
Sure. Luca already did some basic work towards this, collecting the main
points at https://wiki.libav.org/Platform/WindowsPhone, but the points
- If you link statically to the libav libraries, you need to manually add
any dependencies as well, such as ws2_32.lib. (This isn't in any way
specific to windows 8 or so, but is the same on all compilers and all
platforms.)
- You need gas-preprocessor for arm assembly, and you need cpp available
for gas-preprocessor for armasm
// Martin
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Luca Barbato
2014-09-18 17:41:40 UTC
Permalink
Post by Mirko Puliafito
I would also clearly expose the requirements like OS (MS needs windows 8.1
with mobile SDK 8.1), VS version and a link to the msvc toolchain on mingw
guide.
I've built libav for all the other mobile platforms (android and iOS) but
never had so many problems like the ones I had with Windows 8.
What do you think?
I'm all for documenting everything, as you can see iOS and Android are
more or less completely documented. WindowsPhone is more or less me
taking notes, if you would like to add more information I'd be more than
pleased, let me know your wiki user once you registered (sadly we had to
turn off default editing capability due spam waves)

lu
Mirko Puliafito
2014-09-19 10:05:34 UTC
Permalink
@Luca: My wiki account (just created) is MirkoPuliafito. What's the
process? Do you usually review and correct the drafts?

@Martin: my dynamic built was successful on VS but today trying to deploy
to the Windows Phone I get problems on dll exporting. All the core dlls are
signed as Content "True" but it keeps saying "A dependent dll was not
found". I'm using Dependency Walker to go through that but it's also
listing phone dependent dlls. Any hint for me?

Mirko
Post by Luca Barbato
Post by Mirko Puliafito
I would also clearly expose the requirements like OS (MS needs windows
8.1
Post by Mirko Puliafito
with mobile SDK 8.1), VS version and a link to the msvc toolchain on
mingw
Post by Mirko Puliafito
guide.
I've built libav for all the other mobile platforms (android and iOS) but
never had so many problems like the ones I had with Windows 8.
What do you think?
I'm all for documenting everything, as you can see iOS and Android are
more or less completely documented. WindowsPhone is more or less me
taking notes, if you would like to add more information I'd be more than
pleased, let me know your wiki user once you registered (sadly we had to
turn off default editing capability due spam waves)
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Luca Barbato
2014-09-19 11:09:18 UTC
Permalink
Post by Mirko Puliafito
@Luca: My wiki account (just created) is MirkoPuliafito. What's the
process? Do you usually review and correct the drafts?
For the wiki you write the content and if you have doubts you can ping
me and I can edit it to make it look nicer.

lu
Martin Storsjö
2014-09-19 23:19:02 UTC
Permalink
Post by Mirko Puliafito
@Martin: my dynamic built was successful on VS but today trying to deploy
to the Windows Phone I get problems on dll exporting. All the core dlls are
signed as Content "True" but it keeps saying "A dependent dll was not
found". I'm using Dependency Walker to go through that but it's also
listing phone dependent dlls. Any hint for me?
It's been some time since I last tried this, but IIRC you need to manually
add the dll files to the visual studio projects, to make sure it gets
included in the built package - contrary to static linking, it's not
enough that the linking step itself succeeds.

// Martin

Continue reading on narkive:
Loading...