Opened 5 years ago

Closed 5 years ago

#59866 closed defect (fixed)

libde265 @1.0.3 does not build on PPC Tiger because 'memalign' was not declared in this scope

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: tiger Cc: mcalhoun@…, udbraumann
Port: libde265

Description

/bin/sh ../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-7 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include  -DLIBDE265_EXPORTS  -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -Werror=return-ty\
pe -Werror=unused-result -Werror=reorder -DDE265_LOG_ERROR -MT libde265_la-image.lo -MD -MP -MF .deps/libde265_la-image.Tpo -c -o libde265_la-image.lo `test -f 'image.cc' || echo './'`image.cc
libtool: compile:  /opt/local/bin/g++-mp-7 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -DLIBDE265_EXPORTS -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -Werror=return-type -Werror=unused-result -Werror\
=reorder -DDE265_LOG_ERROR -MT libde265_la-image.lo -MD -MP -MF .deps/libde265_la-image.Tpo -c image.cc  -fno-common -DPIC -o .libs/libde265_la-image.o
image.cc: In function 'void* de265_alloc_image_plane(de265_image*, int, void*, int, void*)':
image.cc:60:45: error: 'memalign' was not declared in this scope
 #define ALLOC_ALIGNED(alignment, size)      memalign((alignment), (size))
                                             ^
image.cc:64:45: note: in expansion of macro 'ALLOC_ALIGNED'
 #define ALLOC_ALIGNED_16(size)              ALLOC_ALIGNED(16, size)
                                             ^~~~~~~~~~~~~
image.cc:75:27: note: in expansion of macro 'ALLOC_ALIGNED_16'
   uint8_t* p = (uint8_t *)ALLOC_ALIGNED_16(stride * height + MEMORY_PADDING);
                           ^~~~~~~~~~~~~~~~
image.cc: In function 'int de265_image_get_buffer(de265_decoder_context*, de265_image_spec*, de265_image*, void*)':
image.cc:60:45: error: 'memalign' was not declared in this scope
 #define ALLOC_ALIGNED(alignment, size)      memalign((alignment), (size))
                                             ^
image.cc:64:45: note: in expansion of macro 'ALLOC_ALIGNED'
 #define ALLOC_ALIGNED_16(size)              ALLOC_ALIGNED(16, size)
                                             ^~~~~~~~~~~~~
image.cc:127:21: note: in expansion of macro 'ALLOC_ALIGNED_16'
   p[0] = (uint8_t *)ALLOC_ALIGNED_16(luma_height   * luma_bpl   + MEMORY_PADDING);
                     ^~~~~~~~~~~~~~~~
make[3]: *** [libde265_la-image.lo] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_multimedia_libde265/libde265/work/libde265-1.0.3/libde265'

Which port needs libde265?

Attachments (1)

main.log (76.5 KB) - added by ballapete (Peter "Pete" Dyballa) 5 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Status: newaccepted

comment:2 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

The same happens on PPC Leopard, Mac OS X 10.5.8.

comment:3 Changed 5 years ago by kencu (Ken)

Using the legacysupport PG fixes this. Perhaps Marcus would find this acceptable.

Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 5 years ago by kencu (Ken)

legacysupport provides a not-bad implementation of posix_memalign, that satisfies this software. If you stressed it heavily with memory requests >16 bytes but <4K, you would find warts, tho.

To really fill that need, there are some memory allocation implementations that can be used, but these require changing source code (or at the least, some fancy #define artistry.

comment:5 in reply to:  3 ; Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

Using the legacysupport PG fixes this.

Indeed! This allowed to build on PPC Leopard.

comment:6 Changed 5 years ago by kencu (Ken)

I fixed the other similar port with this issue, but this one belongs to Marcus.

Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

The same error happens with libde265 @1.0.5.

comment:8 in reply to:  7 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

The cure is still

PortGroup                   legacysupport 1.0

in Portfile.

comment:9 Changed 5 years ago by udbraumann

Cc: udbraumann added

comment:10 in reply to:  5 Changed 5 years ago by xanda-escuyer (xanda)

Replying to ballapete:

Replying to kencu:

Using the legacysupport PG fixes this.

Indeed! This allowed to build on PPC Leopard.

We have legacy-support 0.11.1_0 installed/active but libde265 @1.0.5 still won't build; failing with same error.

Are we missing something out?

comment:11 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Has duplicate #60276.

comment:12 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: acceptedclosed

In 91e1dd23a2fb703e638604fb1769faaad8d92e3e/macports-ports (master):

libde265: allow build on older systems

Fixes #59866

Note: See TracTickets for help on using tickets.