Help getting new port nrsc5 working

blake at netjibbing.com blake at netjibbing.com
Sun Apr 16 23:01:51 UTC 2023


It looks like I had a previous partial install that was causing this error. I edited the CMakeLists.txt and got it to build, which in turn cleaned up the edited file. Doing a port clean and installation it’s now working as expected. 

https://github.com/macports/macports-ports/pull/18291
nrsc5: new port by trodemaster · Pull Request #18291 · macports/macports-ports
github.com


Thanks for the help! 

> MakeLists.txt

> On Apr 8, 2023, at 2:09 PM, Joshua Root <jmr at macports.org> wrote:
> 
> On 9/4/2023 06:13, blake at netjibbing.com wrote:
>> I have had this nrsc5 port sitting around for a long time in a broken state. Would you happen to have any suggestions on how to address this build error?
>> Full build log: https://gist.github.com/trodemaster/2ef9d94db3b894ff690ebd365afed0cd <https://gist.github.com/trodemaster/2ef9d94db3b894ff690ebd365afed0cd>
>> WIP port file: https://github.com/trodemaster/blakeports/blob/main/audio/nrsc5/Portfile <https://github.com/trodemaster/blakeports/blob/main/audio/nrsc5/Portfile>
>> /opt/local/var/macports/build/_opt_mports_blakeports_audio_nrsc5/nrsc5/work/nrsc5-59bc2968485635c16c7250696abc3e8ff765b72d/src/nrsc5.c:548:15: error: conflicting types for 'nrsc5_pipe_samples_cu8'
>> NRSC5_API int nrsc5_pipe_samples_cu8(nrsc5_t *st, const uint8_t *samples, unsigned int length)
>>               ^
>> /opt/local/include/nrsc5.h:578:5: note: previous declaration is here
>> int nrsc5_pipe_samples_cu8(nrsc5_t *st, uint8_t *samples, unsigned int length);
>>     ^
> 
> From the log:
> 
> :info:build cd /opt/local/var/macports/build/_opt_mports_blakeports_audio_nrsc5/nrsc5/work/build/src && /usr/bin/clang -DGIT_COMMIT_HASH=\"unknown\" -D_GNU_SOURCE -I/opt/local/include -I/opt/local/var/macports/build/_opt_mports_blakeports_audio_nrsc5/nrsc5/work/build/src -I/opt/local/var/macports/build/_opt_mports_blakeports_audio_nrsc5/nrsc5/work/nrsc5-59bc2968485635c16c7250696abc3e8ff765b72d/include -pipe -Os -DNDEBUG -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -mmacosx-version-min=13.0 -fPIC --std=gnu11 -O3 -Wall -MD -MT src/CMakeFiles/nrsc5_object.dir/nrsc5.c.o -MF CMakeFiles/nrsc5_object.dir/nrsc5.c.o.d -o CMakeFiles/nrsc5_object.dir/nrsc5.c.o -c /opt/local/var/macports/build/_opt_mports_blakeports_audio_nrsc5/nrsc5/work/nrsc5-59bc2968485635c16c7250696abc3e8ff765b72d/src/nrsc5.c
> 
> The first '-I/opt/local/include' in that command is before the two -I flags specifying locations inside the workpath. The order that -I flags are specified on the command line controls the order in which directories are searched when a header is included. So /opt/local/include/nrsc5.h is found instead of the nrsc5.h in the source directory.
> 
> You'll most likely need to patch the CMakeLists.txt to fix this. Find where those flags are added and ensure that the internal locations are added to the start of the flags, and externally specified flags are added to the end. IIRC, cmake has BEFORE and AFTER options you can specify when adding include directories.
> 
> - Josh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20230416/381b3bd1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 18291.png
Type: image/png
Size: 109072 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20230416/381b3bd1/attachment-0001.png>


More information about the macports-dev mailing list