Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65629 closed defect (fixed)

SDRangel @7.6.0_0: error: use of undeclared identifier 'aligned_alloc'; did you mean 'aligned_malloc'?

Reported by: rufty (Bill Hill) Owned by: ra1nb0w
Priority: Normal Milestone:
Component: ports Version:
Keywords: highsierra Cc: michaelld (Michael Dickens), mascguy (Christopher Nielsen)
Port: SDRangel

Description (last modified by jmroot (Joshua Root))

port installed | grep SDRangel
   SDRangel @7.5.1_0+gui+hackrf+libiio+native+rtlsdr+server+soapysdr (active)

sudo port upgrade SDRangel gives an error, seems to be:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_SDRangel/SDRangel/work/sdrangel-7.6.0/plugins/channelrx/demoddatv/ldpctool/layered_decoder.h:24:16: error: 
      use of undeclared identifier 'aligned_alloc'; did you mean 'aligned_malloc'?
        return aligned_alloc(alignment, size);
               ^~~~~~~~~~~~~
               aligned_malloc

Attachments (1)

SDRangel.log (1.2 MB) - added by rufty (Bill Hill) 2 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_SDRangel/SDRangel/main.log

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by rufty (Bill Hill)

Attachment: SDRangel.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_SDRangel/SDRangel/main.log

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Cc: michaelld added
Description: modified (diff)
Owner: set to ra1nb0w
Status: newassigned

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 Changed 2 years ago by ra1nb0w

clang 10.0.0 should support c++17 therefore it should have aligned_alloc. Maybe forcing macports's clang? just like for previous macOS version?

comment:4 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: highsierra added
Summary: SDRangel 7.6.0_0 upgrade failure on OSX 10.13.6SDRangel @7.6.0_0: error: use of undeclared identifier 'aligned_alloc'; did you mean 'aligned_malloc'?

I found many other projects with this error. As far as I can tell, aligned_alloc is for C code (C11 and later) while std::aligned_alloc is for C++ code (C++17 and later). This file being compiled here is C++ code so perhaps it should be using std::aligned_alloc instead of aligned_alloc. The port succeeded building on macOS 10.15 and later; maybe later versions of clang are more relaxed about this distinction or maybe the default C language mode is newer in newer version of clang.

comment:5 Changed 2 years ago by Davide Gerhard <ra1nb0w@…>

Resolution: fixed
Status: assignedclosed

In 172dcc4bb7af6bf9dd339e1f5cbca1b3be29514a/macports-ports (master):

sdrangel: update version to 7.6.1

should fix the aligned_alloc build failure.

Closes: #65629

comment:6 Changed 2 years ago by ra1nb0w

confirm that it works fine also for you. thanks

comment:7 Changed 2 years ago by rufty (Bill Hill)

That worked, thanks!

Note: See TracTickets for help on using tickets.