Opened 6 months ago

Closed 6 months ago

#69575 closed defect (fixed)

octave destroot fails on ppc: octave-cli(75831) malloc: *** error for object 0x4107034: Non-aligned pointer being freed

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: tiger, leopard, snowleopard, powerpc Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), Schamschula (Marius Schamschula), catap (Kirill A. Korinsky)
Port: octave

Description

make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/octave-9.1.0'
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/destroot/opt/local/lib/octave/9.x.x
octave-cli(75831) malloc: *** error for object 0x4107034: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x41070a4: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3193880: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192ee8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192e50: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192e9c: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192d88: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192c60: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192b80: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192bf0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3192ab8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x31937c0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3193940: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x319394c: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(75831) malloc: *** error for object 0x3193968: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Command failed: ./run-octave -cli -q -f -H --eval 'try; pkg prefix /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/destroot/opt/local/share/octave/packages /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/destroot/opt/local/lib/octave/packages; pkg global_list /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/destroot/opt/local/share/octave/octave_packages; pkg -verbose -global rebuild; disp(lasterror.message); catch; exit(1); end_try_catch;'
Exit code: 1

Assigning this to myself, since this is specific to libstdc++ which is only used on PowerPC systems. (Or does 10.5 x85 also use it? Then it will likely fail there as well.)

Change History (5)

comment:1 Changed 6 months ago by barracuda156

It actually kinda runs manually, though with the same malloc errors:

36-98% /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_octave/octave/work/octave-9.1.0/run-octave 
octave-cli(76099) malloc: *** error for object 0x4107034: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x41070a4: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3193880: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192ee8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192e50: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192e9c: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192d88: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192c60: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192b80: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192bf0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3192ab8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x31937c0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3193940: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x319394c: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
octave-cli(76099) malloc: *** error for object 0x3193968: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
GNU Octave, version 9.1.0
Copyright (C) 1993-2024 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "powerpc-apple-darwin10.0.0d2".

Home page:            https://octave.org
Support resources:    https://octave.org/support
Improve Octave:       https://octave.org/get-involved

For changes from previous versions, type 'news'.

Perhaps can be fixed via legacysupport.

comment:2 Changed 6 months ago by barracuda156

Yes it does, at least manually adding this chunk into run-octave script lets it launch without any errors:

if [ -n "$DYLD_LIBRARY_PATH" ]; then
   DYLD_LIBRARY_PATH=/opt/local/lib/libgcc:${DYLD_LIBRARY_PATH}
else
   DYLD_LIBRARY_PATH=/opt/local/lib/libgcc
fi
export DYLD_LIBRARY_PATH

comment:3 in reply to:  description ; Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

Non-aligned pointer being freed

Same error previously reported in other ports in #59832, #65286.

comment:4 in reply to:  3 Changed 6 months ago by barracuda156

Replying to ryandesign:

Replying to barracuda156:

Non-aligned pointer being freed

Same error previously reported in other ports in #59832, #65286.

Yes, I know that. (It is not identical in 100% of cases, but very often it is.)

I will try to sort this out, together with fixing powerpc host, dropping hdf5 restriction for mpich and hopefully restoring Qt4.

  1. S. Weird thing is that octave tries to run its binaries during destroot and activation.
Last edited 6 months ago by barracuda156 (previous) (diff)

comment:5 Changed 6 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 7b9f0977efc042d575fda56031b943ecb14dd574/macports-ports (master):

octave: fix running on libstdc++ systems

Fixes: #69575

Note: See TracTickets for help on using tickets.