Compiling libvpx on Solaris x64

43 views
Skip to first unread message

Ben Hood

unread,
Mar 16, 2016, 3:05:53 PM3/16/16
to webm-d...@webmproject.org
Hi,

I'm not sure if this is the right list but I trying to compile libvpx
as a 64 bit library on Solaris 11.3

It seems to assemble an ELF32 libvpx.a.

It also results in uncompilable tests. I could ignore the test
failures if the image were linkable, but I'd like it to be 64 bit.

I'm using commit 627a3ddc with yasm 1.3.0 using the following flags:

CFLAGS="-m64" CXXFLAGS="-m64" ./configure --target=x86_64-solaris-gcx

(verbose output below)

Running gmake 3.82 results in a lot of warnings and right at the end
some CXX warnings, which I assume are ignorable in C but not so in
CXX:

[CXX] test/../third_party/libwebm/mkvparser.cpp.o
test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
mkvparser::isnan(double)’:
test/../third_party/libwebm/mkvparser.cpp:35:40: error: ‘isnan’ is not
a member of ‘std’
inline bool isnan(double val) { return std::isnan(val); }

Maybe I'm doing something obviously wrong? Any pointers would be appreciated.

Many thanks,

Ben



-- gmake verbose output --

[AR] libvpx_g.a
[STRIP] libvpx.a < libvpx_g.a
[CREATE] vpx.pc
[CC] test/../ivfenc.c.o
[CXX] test/../third_party/libwebm/mkvparser.cpp.o
test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
mkvparser::isnan(double)’:
test/../third_party/libwebm/mkvparser.cpp:35:40: error: ‘isnan’ is not
a member of ‘std’
inline bool isnan(double val) { return std::isnan(val); }
^
test/../third_party/libwebm/mkvparser.cpp:35:40: note: suggested alternatives:
In file included from /usr/gcc/4.8/include/c++/4.8.2/cmath:44:0,
from test/../third_party/libwebm/mkvparser.cpp:18:
/usr/include/math.h:143:12: note: ‘isnan’
extern int isnan __P((double));
^
test/../third_party/libwebm/mkvparser.cpp:35:13: note: ‘mkvparser::isnan’
inline bool isnan(double val) { return std::isnan(val); }
^
test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
mkvparser::isinf(double)’:
test/../third_party/libwebm/mkvparser.cpp:36:40: error: ‘isinf’ is not
a member of ‘std’
inline bool isinf(double val) { return std::isinf(val); }
^
test/../third_party/libwebm/mkvparser.cpp:36:40: note: suggested alternative:
test/../third_party/libwebm/mkvparser.cpp:36:13: note: ‘mkvparser::isinf’
inline bool isinf(double val) { return std::isinf(val); }
^
test/../third_party/libwebm/mkvparser.cpp:36:57: warning: control
reaches end of non-void function [-Wreturn-type]
inline bool isinf(double val) { return std::isinf(val); }
^
test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
mkvparser::isnan(double)’:
test/../third_party/libwebm/mkvparser.cpp:35:57: warning: control
reaches end of non-void function [-Wreturn-type]
inline bool isnan(double val) { return std::isnan(val); }
^
gmake[1]: *** [test/../third_party/libwebm/mkvparser.cpp.o] Error 1
gmake: *** [.DEFAULT] Error 2

-- configure verbose output --

$ CFLAGS="-m64" CXXFLAGS="-m64" ./configure --target=x86_64-solaris-gcx
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: illegal statement near line 1
Configuring selected codecs
enabling vp8_encoder
enabling vp8_decoder
enabling vp9_encoder
enabling vp9_decoder
Configuring for target 'x86_64-solaris-gcc'
enabling x86_64
enabling runtime_cpu_detect
enabling mmx
enabling sse
enabling sse2
enabling sse3
enabling ssse3
enabling sse4_1
enabling avx
enabling avx2
using yasm
enabling use_x86inc
enabling postproc
enabling unit_tests
enabling webm_io
enabling libyuv
grep: illegal option -- E
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
grep: illegal option -- E
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
grep: illegal option -- E
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
Creating makefiles for x86_64-solaris-gcc libs
Creating makefiles for x86_64-solaris-gcc examples
Creating makefiles for x86_64-solaris-gcc docs

James Zern

unread,
Mar 17, 2016, 8:05:50 PM3/17/16
to WebM Discussion
Hi,

On Wed, Mar 16, 2016 at 12:05 PM, Ben Hood <0x6e...@gmail.com> wrote:
> Hi,
>
> I'm not sure if this is the right list but I trying to compile libvpx
> as a 64 bit library on Solaris 11.3
>
> It seems to assemble an ELF32 libvpx.a.
>
> It also results in uncompilable tests. I could ignore the test
> failures if the image were linkable, but I'd like it to be 64 bit.
>
> I'm using commit 627a3ddc with yasm 1.3.0 using the following flags:
>
> CFLAGS="-m64" CXXFLAGS="-m64" ./configure --target=x86_64-solaris-gcx
>

For now to reduce the noise you could add '--disable-unit-tests
--disable-libyuv --disable-webm-io' to avoid any C++. In the end
you'll probably want webm-io at least, see the notes below.

> (verbose output below)
>
> Running gmake 3.82 results in a lot of warnings and right at the end
> some CXX warnings, which I assume are ignorable in C but not so in
> CXX:
>
> [CXX] test/../third_party/libwebm/mkvparser.cpp.o
> test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
> mkvparser::isnan(double)’:
> test/../third_party/libwebm/mkvparser.cpp:35:40: error: ‘isnan’ is not
> a member of ‘std’
> inline bool isnan(double val) { return std::isnan(val); }
>

There's a workaround for visual studio that might be adapted.

> Maybe I'm doing something obviously wrong? Any pointers would be appreciated.
>

I think it's been a while since any solaris builds have been done,
thanks for giving it a try.
This is probably expecting gawk. A configure search for the right
binary could help.
-E is a POSIX addition, but I don't think this is for anything
meaningful, so can probably be ignored for now.

Ben Hood

unread,
Mar 18, 2016, 6:13:07 PM3/18/16
to webm-d...@webmproject.org
James,

Many thanks for the heads up.

On Fri, Mar 18, 2016 at 12:05 AM, 'James Zern' via WebM Discussion
<webm-d...@webmproject.org> wrote:
> For now to reduce the noise you could add '--disable-unit-tests
> --disable-libyuv --disable-webm-io' to avoid any C++. In the end
> you'll probably want webm-io at least, see the notes below.

Indeed, running with the following options seems to work:

CFLAGS="-m64" ./configure --disable-unit-tests --disable-libyuv
--disable-webm-io --prefix=/opt/fs_libs/ --target=x86_64-solaris-gcc

However, if libwebm is required, this won't compile with gcc/Solaris,
for the reasons outlined previously.

You mentioned that there was a workaround for VS that could be tweaked
- is this in a README somewhere?

>> (verbose output below)
>>
>> Running gmake 3.82 results in a lot of warnings and right at the end
>> some CXX warnings, which I assume are ignorable in C but not so in
>> CXX:
>>
>> [CXX] test/../third_party/libwebm/mkvparser.cpp.o
>> test/../third_party/libwebm/mkvparser.cpp: In function ‘bool
>> mkvparser::isnan(double)’:
>> test/../third_party/libwebm/mkvparser.cpp:35:40: error: ‘isnan’ is not
>> a member of ‘std’
>> inline bool isnan(double val) { return std::isnan(val); }
>>
>
> There's a workaround for visual studio that might be adapted.
>
>> Maybe I'm doing something obviously wrong? Any pointers would be appreciated.
>>
>
> I think it's been a while since any solaris builds have been done,
> thanks for giving it a try.

Sure - I appreciate that Solaris might not be one the supported platforms.

> This is probably expecting gawk. A configure search for the right
> binary could help.

Indeed - I aliased awk to gawk and the awk issues went away.

> -E is a POSIX addition, but I don't think this is for anything
> meaningful, so can probably be ignored for now.

I also aliased grep to ggrep, but this did not help much. But as you
it is probably not so important as it doesn't actually cause the build
to fail.

Ben

James Zern

unread,
Mar 21, 2016, 3:04:32 PM3/21/16
to WebM Discussion
On Fri, Mar 18, 2016 at 3:13 PM, Ben Hood <0x6e...@gmail.com> wrote:
> James,
>
> Many thanks for the heads up.
>
> On Fri, Mar 18, 2016 at 12:05 AM, 'James Zern' via WebM Discussion
> <webm-d...@webmproject.org> wrote:
>> For now to reduce the noise you could add '--disable-unit-tests
>> --disable-libyuv --disable-webm-io' to avoid any C++. In the end
>> you'll probably want webm-io at least, see the notes below.
>
> Indeed, running with the following options seems to work:
>
> CFLAGS="-m64" ./configure --disable-unit-tests --disable-libyuv
> --disable-webm-io --prefix=/opt/fs_libs/ --target=x86_64-solaris-gcc
>

Great, that' a good start.

> However, if libwebm is required, this won't compile with gcc/Solaris,
> for the reasons outlined previously.
>

Strictly speaking it isn't required, but it's convenient for the
examples to be able to handle webm files rather than a simple and
custom format.

> You mentioned that there was a workaround for VS that could be tweaked
> - is this in a README somewhere?
>

Sorry, I meant it was within mkvparser.cpp itself:

https://chromium.googlesource.com/webm/libvpx/+/master/third_party/libwebm/mkvparser.cpp#31
Reply all
Reply to author
Forward
0 new messages