Hi,
The error is caused by markExternal not handling VectorTypes and MetadataTypes. Please add cases for them so that libsecp256k1 can compile successfully.
I suggest this diff, it seems to work:
diff --git a/interp/memory.go b/interp/memory.go
index 2812cd01..e5e6a801 100644
--- a/interp/memory.go
+++ b/interp/memory.go
@@ -223,6 +223,8 @@ func (mv *memoryView) markExternal(llvmValue llvm.Value, mark uint8) error {
}
}
case llvm.ArrayTypeKind:
+ fallthrough
+ case llvm.VectorTypeKind:
numElements := llvmType.ArrayLength()
for i := 0; i < numElements; i++ {
element := mv.r.builder.CreateExtractValue(llvmValue, i, "")
@@ -231,6 +233,7 @@ func (mv *memoryView) markExternal(llvmValue llvm.Value, mark uint8) error {
return err
}
}
+ case llvm.MetadataTypeKind:
default:
return errors.New("interp: unknown type kind in markExternalValue")
}
Hi,
The error is caused by markExternal not handling VectorTypes and MetadataTypes. Please add cases for them so that libsecp256k1 can compile successfully.
I suggest this diff, it seems to work: