macports-ports icon indicating copy to clipboard operation
macports-ports copied to clipboard

factor: update to 0.98

Open barracuda156 opened this issue 1 year ago • 4 comments

Description

Please ignore this right now, I need to see if it builds on Intel. Gonna convert to Draft after that, since PPC part in process and I may need some help.

Type(s)
  • [x] bugfix
  • [x] enhancement
  • [ ] security fix
Tested on

macOS 10.6.8 Server Xcode 3.2.6

Verification

Have you

  • [x] followed our Commit Message Guidelines?
  • [x] squashed and minimized your commits?
  • [x] checked that there aren't other open pull requests for the same change?
  • [ ] referenced existing tickets on Trac with full URL?
  • [ ] checked your Portfile with port lint --nitpick?
  • [ ] tried existing tests with sudo port test?
  • [ ] tried a full install with sudo port -vst install?
  • [ ] tested basic functionality of all binary files?

barracuda156 avatar Aug 19 '22 18:08 barracuda156

Notifying maintainers: @ci42 for port factor.

macportsbot avatar Aug 19 '22 18:08 macportsbot

So buildbot fails on:

13: << "libcrypto" {
17: } cond cdecl add-library >>
                                 ^
  Error in print-error!
  Factor 0.98 x86.64 (1889, FACTOR_GIT_LABEL-, Aug 19 2022 18:45:46)
  [Clang (GCC Apple LLVM 13.1.6 (clang-1316.0.21.2.5))] on macosx
  IN: scratchpad 
  Command failed: cd /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_lang_factor/factor/work/factor && ./factor -i=./boot.unix-x86.64.image
  Exit code: 1
  Error: Failed to build factor: command execution failed
  DEBUG: Error code: NONE

I did not get that far on PPC yet :)

barracuda156 avatar Aug 19 '22 18:08 barracuda156

PPC build fails for me with malloc errors (mind, this is on Rosetta, native build may behave differently):

/opt/local/bin/g++-mp-12 -Wall -pedantic -DFACTOR_VERSION="0.98" -Os -arch ppc -O1 -dynamiclib -single_module -current_version 0.98 -compatibility_version 0.98 -fvisibility=hidden -lm -framework Cocoa -framework AppKit -o libfactor.dylib vm/os-unix.o vm/os-macosx.o vm/mach_signal.o vm/mvm-unix.o vm/cpu-ppc.o vm/aging_collector.o vm/alien.o vm/arrays.o vm/bignum.o vm/byte_arrays.o vm/callbacks.o vm/callstack.o vm/code_blocks.o vm/code_heap.o vm/compaction.o vm/contexts.o vm/data_heap.o vm/data_heap_checker.o vm/debug.o vm/dispatch.o vm/entry_points.o vm/errors.o vm/factor.o vm/full_collector.o vm/gc.o vm/image.o vm/inline_cache.o vm/instruction_operands.o vm/io.o vm/jit.o vm/math.o vm/mvm.o vm/nursery_collector.o vm/object_start_map.o vm/objects.o vm/primitives.o vm/quotations.o vm/run.o vm/safepoints.o vm/sampling_profiler.o vm/strings.o vm/to_tenured_collector.o vm/tuples.o vm/utilities.o vm/vm.o vm/words.o
mkdir -p Factor.app/Contents/MacOS
mkdir -p Factor.app/Contents/Frameworks
mv factor Factor.app/Contents/MacOS/factor
ln -s Factor.app/Contents/MacOS/factor ./factor
gmake[1]: Leaving directory '/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_factor/factor/work/factor'
gmake: Leaving directory '/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_factor/factor/work/factor'
factor(23374) malloc: *** error for object 0xa0f15754: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
factor(23374) malloc: *** error for object 0xa0f157c4: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
2022-08-20 02:21:11.106 factor[23374:903] *** __NSAutoreleaseNoPool(): Object 0x100d160 of class NSPathStore2 autoreleased with no pool in place - just leaking
2022-08-20 02:21:11.156 factor[23374:903] *** __NSAutoreleaseNoPool(): Object 0x1010d80 of class NSPathStore2 autoreleased with no pool in place - just leaking
2022-08-20 02:21:11.163 factor[23374:903] *** __NSAutoreleaseNoPool(): Object 0x1009020 of class NSCFString autoreleased with no pool in place - just leaking
2022-08-20 02:21:11.169 factor[23374:903] *** __NSAutoreleaseNoPool(): Object 0x1010e40 of class NSCFData autoreleased with no pool in place - just leaking
truncated image: 2886212 bytes read, 2886272 bytes expected
fatal_error: load_data_heap failed: 0

Nursery   : [0xb440000 -> 0xb540000]    1048576 bytes
Aging     : [0xb040000 -> 0xb240000]    2097152 bytes
Tenured   : [0x5040000 -> 0xb040000]  100663296 bytes
Cards     : [0x1444000 -> 0x14a9400]     414720 bytes

Contexts:

  Datastack   : [0x7b9000 -> 0x7d9000]     131072 bytes
  Retainstack : [0x7db000 -> 0x7fb000]     131072 bytes
  Callstack   : [0x1301000 -> 0x1401000]    1048576 bytes

sh: line 1: 23374 Abort trap              ./factor -i=./boot.macosx-ppc.image
Command failed: cd /opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_factor/factor/work/factor && ./factor -i=./boot.macosx-ppc.image
Exit code: 134

barracuda156 avatar Aug 19 '22 19:08 barracuda156

@evanmiller @kencu @mascguy If anyone could try this on PPC natively, would be interesting to see if it fails identically or not.

P. S. Large chunk of patches was an attempt to fix dispatch_signal_handler undefined symbol (perhaps missing in SDK?). I borrowed some code from 0.93 (the last version which supported Darwin PPC), and likely made errors in the process. Consider this WIP.

barracuda156 avatar Aug 19 '22 19:08 barracuda156

Natively still fails, though without malloc errors:

2022-10-10 00:06:25.319 factor[3945:10b] *** __NSAutoreleaseNoPool(): Object 0x5b0c6d0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2022-10-10 00:06:25.322 factor[3945:10b] *** __NSAutoreleaseNoPool(): Object 0x5b0dc90 of class NSPathStore2 autoreleased with no pool in place - just leaking
2022-10-10 00:06:25.322 factor[3945:10b] *** __NSAutoreleaseNoPool(): Object 0x5b0a340 of class NSCFString autoreleased with no pool in place - just leaking
2022-10-10 00:06:25.323 factor[3945:10b] *** __NSAutoreleaseNoPool(): Object 0x5b0dff0 of class NSCFData autoreleased with no pool in place - just leaking
truncated image: 2886212 bytes read, 2886272 bytes expected
fatal_error: load_data_heap failed: 0

Nursery   : [0xd980000 -> 0xda80000]    1048576 bytes
Aging     : [0xd580000 -> 0xd780000]    2097152 bytes
Tenured   : [0x7580000 -> 0xd580000]  100663296 bytes
Cards     : [0x5c8e000 -> 0x5cf3400]     414720 bytes

Contexts:

  Datastack   : [0x5c09000 -> 0x5c29000]     131072 bytes
  Retainstack : [0x5c2b000 -> 0x5c4b000]     131072 bytes
  Callstack   : [0x5e01000 -> 0x5f01000]    1048576 bytes

sh: line 1:  3945 Abort trap              ./factor -i=./boot.macosx-ppc.image
Command failed: cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_factor/factor/work/factor && ./factor -i=./boot.macosx-ppc.image
Exit code: 134

barracuda156 avatar Oct 09 '22 16:10 barracuda156

feel free to pick this up and open a PR once you have this building locally

reneeotten avatar Aug 13 '23 11:08 reneeotten

@reneeotten Yes, right. Thank you. No point to have this hanging in the meanwhile. I will work on PPC, may take time, since it is not high in priority. But not given up upon too.

barracuda156 avatar Aug 13 '23 13:08 barracuda156