[MacPorts] #70665: ngspice-lib fails to build: error: duplicate member 'component'

MacPorts noreply at macports.org
Sat Aug 31 03:24:02 UTC 2024


#70665: ngspice-lib fails to build: error: duplicate member 'component'
-----------------------------------+----------------------
  Reporter:  barracuda156          |      Owner:  bpdegnan
      Type:  defect                |     Status:  assigned
  Priority:  Normal                |  Milestone:
 Component:  ports                 |    Version:  2.10.1
Resolution:                        |   Keywords:
      Port:  ngspice, ngspice-lib  |
-----------------------------------+----------------------

Comment (by markemer):

 Replying to [comment:2 barracuda156]:
 > Replying to [comment:1 markemer]:
 > > We don't hardcode arch do we? Or is that in ngspice? I have zero way
 to test this, I haven't had a working PPC machine quite some time. If you
 have a way to fix it without breaking modern macOS, I'm more than happy to
 merge it.
 > >
 > > We probably should set the required C++ standard no matter what.
 >
 > The portfile added `-m64`, unconditionally. No idea what for, MacPorts
 normally handles flags correctly, and this port is not an exception.
 >
 > Anyway, I have a fix for KLU issue.
 >
 > P. S. Do you know why my patch was removed? It is still needed, upstream
 fixed nothing ever since.
 > {{{
 > get_avail_mem_size.c:22:2: warning: #import is a deprecated GCC
 extension [-Wdeprecated]
 >    22 | #import <mach/mach.h>
 >       |  ^~~~~~
 > get_resident_set_size.c: In function 'getCurrentRSS':
 > get_resident_set_size.c:114:33: error: storage size of 'info' isn't
 known
 >   114 |     struct mach_task_basic_info info;
 >       |                                 ^~~~
 > get_avail_mem_size.c:23:2: warning: #import is a deprecated GCC
 extension [-Wdeprecated]
 >    23 | #import <mach/mach_host.h>
 >       |  ^~~~~~
 > get_resident_set_size.c:115:40: error: 'MACH_TASK_BASIC_INFO_COUNT'
 undeclared (first use in this function); did you mean
 'TASK_BASIC_INFO_COUNT'?
 >   115 |     mach_msg_type_number_t infoCount =
 MACH_TASK_BASIC_INFO_COUNT;
 >       |
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
 >       |                                        TASK_BASIC_INFO_COUNT
 > get_resident_set_size.c:115:40: note: each undeclared identifier is
 reported only once for each function it appears in
 > get_resident_set_size.c:116:40: error: 'MACH_TASK_BASIC_INFO' undeclared
 (first use in this function); did you mean 'TASK_BASIC_INFO'?
 >   116 |     if ( task_info( mach_task_self( ), MACH_TASK_BASIC_INFO,
 >       |                                        ^~~~~~~~~~~~~~~~~~~~
 >       |                                        TASK_BASIC_INFO
 > get_resident_set_size.c:116:5: warning: this 'if' clause does not
 guard... [-Wmisleading-indentation]
 >   116 |     if ( task_info( mach_task_self( ), MACH_TASK_BASIC_INFO,
 >       |     ^~
 > get_resident_set_size.c:119:9: note: ...this statement, but the latter
 is misleadingly indented as if it were guarded by the 'if'
 >   119 |         return (unsigned long long) info.resident_size;
 >       |         ^~~~~~
 > get_resident_set_size.c:114:33: warning: unused variable 'info'
 [-Wunused-variable]
 >   114 |     struct mach_task_basic_info info;
 >       |                                 ^~~~
 > get_resident_set_size.c:140:1: warning: control reaches end of non-void
 function [-Wreturn-type]
 >   140 | }
 >       | ^
 > make[4]: *** [get_resident_set_size.lo] Error 1
 > }}}

 We can add that patch back in, it built fine without it out it on arm and
 intel with v43. We can add it back in. I'll leave a comment for future me
 as to why it's in there.

-- 
Ticket URL: <https://trac.macports.org/ticket/70665#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list