Installing pyXX-opencv

2024-03-13 Thread Frederick Weinhaus
I have been having trouble installing any of the ports: py39-opencv or 
py310-opencv or py311-opencv for a while now. I get errors that I have reported 
at https://trac.macports.org/ticket/69381.  The OpenCV port seems to have issue 
with installing the EXR decoder Chromaticities. Anyone know how to install 
opencv now on M1 Ventura configuration?  Is there some work-around for my 
install issue?

Fred Weinhaus

Re: MacPorts vs. Apple compiler issues, Handle

2024-03-13 Thread Joshua Root

On 13/3/2024 20:52, Riccardo Mottola wrote:
I found a minor patch by Firefox to solve this namespace collision. So 
for whatever reason Apple's did differently, it now compiles on all 
compilers.


However clang9 generates a crashing executable. I tried on both 10.11 
and 10.13.


- Apple clang: works fine
- MacPorts clang 7: compiles & works
- MacPorts clang 9 : compiles but fails

anybody has seen this behaviour in other software, perhaps smaller and 
easier to test than ArcticFox?


Yes, any number of programs have had bugs that only became apparent when 
building with a newer compiler. But that's a very broad category, so 
without knowing the nature of the crash you're seeing, it's impossible 
to say what else might have had a similar problem.


Bugs in clang are not unknown, but far more common is programs relying 
on certain behaviour for operations that have undefined behaviour 
according to the language standard. Or sometimes the layout of memory 
just shifts slightly, causing a previously benign buffer overflow to do 
damage. Sometimes a newer compiler will also default to a newer version 
of the language, so if that's the cause of the differing behaviour, you 
can use -std to change it back.


Otherwise, you have to do the hard work of debugging: Look at the crash 
report to see where and how the code is crashing, pay attention to 
compiler warnings, and systematically eliminate possibilities of what 
could be going wrong. Building with clang's sanitizers may be helpful, 
particularly -fsanitize=address and -fsanitize=undefined, though in a 
code base this size I wouldn't be surprised if they also detected 
hundreds of other potential issues.


- Josh


Re: MacPorts vs. Apple compiler issues, Handle

2024-03-13 Thread Riccardo Mottola via macports-users

Hi,

Joshua Root wrote:


The version difference is less slight than you might think. Apple 
clang version numbers are unrelated to the version number of the 
llvm.org release they are based on. Apple clang 9.1.0 is closest to 
the clang-5.0 port.


The name collision looks genuine however. I can only assume that 
MacTypes.h is not included or is preprocessed differently based on 
different defines in the other compiler. 


I found a minor patch by Firefox to solve this namespace collision. So 
for whatever reason Apple's did differently, it now compiles on all 
compilers.


However clang9 generates a crashing executable. I tried on both 10.11 
and 10.13.


- Apple clang: works fine
- MacPorts clang 7: compiles & works
- MacPorts clang 9 : compiles but fails

anybody has seen this behaviour in other software, perhaps smaller and 
easier to test than ArcticFox?


Riccardo


libiconv build fail w/macOS 14.4 (darwin/23.4.0) arch arm

2024-03-13 Thread Paul Kippes
Hi,

A recent OS update motivated the migration procedure of macports.  I'm
seeing a build error with libiconv (its one dependency installed
fine).

Prior working OS (captured from alt./separate system):

:debug:sysinfo macOS 14.3.1 (darwin/23.3.0) arch arm
:debug:sysinfo MacPorts 2.9.1
:debug:sysinfo Xcode 15.2, CLT 15.1.0.0.1.1700200546
:debug:sysinfo SDK 14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 14.0

Failing OS (differences only):

:debug:sysinfo macOS 14.4 (darwin/23.4.0) arch arm
:debug:sysinfo Xcode 15.3, CLT 15.3.0.0.1.1708646388

Comparing the build log of the alt. system to failing OS points to
this like that was a compiler warning and is now an error.  This
section of lib/encodings.def is part of the patched area.  I attempted
to add configure.cflags-append, providing
"-Wno-incompatible-function-pointer-types" without success.  First
time attempting to debug macports, so no doubt am wrong here.  Any
advice on how to proceed on adjusting Portfile patch or local OS issue
would be appreciated.  Thanks, --Paul

section of build log:

:info:build In file included from lib/genflags.c:109:
:info:build lib/encodings.def:75:45: error: incompatible function
pointer types initializing 'int (*)(conv_t, unsigned char *, ucs4_t,
size_t)' (aka 'int (*)(struct conv_struct *, unsigned char *, unsigned
int, unsigned long)') with an expression of type 'int (conv_t,
unsigned char *, ucs4_t, int)' (aka 'int (struct conv_struct *,
unsigned char *, unsigned int, int)')
[-Wincompatible-function-pointer-types]
:info:build { utf8mac_mbtowc, NULL }, { utf8mac_wctomb, NULL })
:info:build ^~
:info:build lib/genflags.c:104:34: note: expanded from macro 'DEFENCODING'
:info:build struct wctomb_funcs ofuncs = xxx_ofuncs1,xxx_ofuncs2; \
:info:build  ^~~