[x265] x265 building failed in cygwin

Steve Borho steve at borho.org
Wed Nov 20 06:55:29 CET 2013


Interesting, so cygwin is reporting as UNIX to cmake but yasm needs to make win64 binaries for it to link.

On Nov 19, 2013, at 8:42 PM, idxa at sina.com wrote:

> I have deleted "elseif(UNIX)" branch and it has been built successfully in Cygwin, thanks!
>  
> if(X64)
>     set(ASM_FLAGS "-DARCH_X86_64=1 -m amd64 -DPIC")
>     if(APPLE)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho64 -DPREFIX")
>     elseif(UNIX)

does this work:

elseif(UNIX AND NOT CYGWIN)

>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f elf64")
>     else()
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f win64")
>     endif()
> else()
>     set(ASM_FLAGS -DARCH_X86_64=0)
>     if(APPLE)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho")
>     else()
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f win32 -DPREFIX")
>     endif()
> endif()
>  
> 
> On Tue, Nov 12, 2013 at 9:54 PM, chen <chenm003 at 163.com> wrote:
> 
> >
> > On Mon, Nov 11, 2013 at 8:51 PM, <idxa at sina.com> wrote:
> >
> >> Hi,
> >> I have built x265 in cygwin using the following step,
> >> 1. cd x265/build/linux
> >> 2. ./make-Makefiles.bash
> >> 3. make
> >>
> >> it shows:
> >> Cannot export x265_cpu_cpuid: symbol not defined
> >> Cannot export x265_cpu_cpuid_test: symbol not defined
> >> Cannot export x265_cpu_emms: symbol not defined
> >> ...
> >> My question is how to modify to let x265 support cygwin?
> >>
> >
> > We primarily support MinGW for GCC on Windows, but in all likely-hood
> > cygwin could be made to work.
> >
> > Can you send me the full build log, particularly the cmake portion?  For
> > whatever reason cpu-a.asm isn't being linked into the static lib.
> >
> > Seems ABI problem, he use GCC makefile and Cygwin+Yasm use difference ABI
> >
> >
> 
> good point.  This might be a yasm command line flag issue, our cmake file
> has:
> if(X64)
>     set(ASM_FLAGS "-DARCH_X86_64=1 -m amd64 -DPIC")
>     if(APPLE)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho64 -DPREFIX")
>     elseif(UNIX)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f elf64")
>     else()
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f win64")
>     endif()
> else()
>     set(ASM_FLAGS -DARCH_X86_64=0)
>     if(APPLE)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho")
>     elseif(UNIX)
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f elf32")
>     else()
>         set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f win32 -DPREFIX")
>     endif()
> endif()
> 
> I presume cygwin takes the UNIX path; but does elf64/elf32 link with cygwin
> gcc compiled C++ code? I'm afraid it's been several years since I've used
> cygwin.  Msys has been a much saner environment for so long.
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131119/99ebe6c5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131119/99ebe6c5/attachment-0001.sig>


More information about the x265-devel mailing list