Hi Than,

I see there is malloc.h present in that path.
But, cmake throws one more error even before the mmap issue:

*-- Performing Test SPLIT_STACK_FUNCTIONAL*
*-- Performing Test SPLIT_STACK_FUNCTIONAL - Failed*
*-- trying -fcf-protection=none workaround*
*-- Performing Test SPLIT_STACK_WORKAROUND*
*-- Performing Test SPLIT_STACK_WORKAROUND - Failed*
*CMake Error at tools/gollvm/cmake/modules/AddGollvm.cmake:68 (message):*
*  C compiler does not support -fsplit-stack*
*Call Stack (most recent call first):*
*  tools/gollvm/CMakeLists.txt:22 (include)*

Tried compiling the compile source specified in cmake file manually with 
fsplit-stack and workaround of fcf-protection=none. 
But, linker is unable to find the symbol __morestack:


*ld: error: undefined symbol: __morestack*

Can you please help if I'm missing out any configuration ?

Build environment:
clang 13.0.1 on FreeBSD 12.

On Thursday, 27 January 2022 at 19:15:44 UTC+5:30 th...@google.com wrote:

> Hello,
>
> As I understand it FreeBSD doesn't have any concept of a build essentials 
> package, so in theory /usr/include/malloc.h should always be installed. Are 
> you saying that this file doesn't exist on your system?
>
> Thanks, Than
>
>
> On Thu, Jan 27, 2022 at 5:38 AM T Odin <thorodins...@gmail.com> wrote:
>
>> I'm trying to build gollvm on FreeBSD 13 using the command as mentioned 
>> in gollvm source page.
>>
>> *cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -G Ninja 
>> ../llvm-project/llvm *
>>
>> I observed that during configuration it fails for malloc 
>>
>> *Looking for malloc/malloc.hLooking for malloc/malloc.h - not found*
>>
>> which ends up with subsequent build failures for all the dependencies 
>> libffi, libbacktrace with 
>>
>>
>>
>> *Support for mmap() is required -- setup failed.Call Stack (most recent 
>> call first):tools/gollvm/libgo/CMakeLists.txt:49 (setup_libffi)*
>>
>> I read from the FAQs that support for OS other than Linux wasn't 
>> supported. I'd like to clarify the changes required to be ported for 
>> compiling and supporting on other OS. 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/238a962f-b12e-4ccb-b2d6-0bbd91fb0040n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/238a962f-b12e-4ccb-b2d6-0bbd91fb0040n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/76c04c1c-8e50-43b2-9e88-7378535028b3n%40googlegroups.com.

Reply via email to