Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Issues on make on Mac ( Catalina) #745

Closed
johnnavaj opened this issue Oct 21, 2020 · 8 comments
Closed

Getting Issues on make on Mac ( Catalina) #745

johnnavaj opened this issue Oct 21, 2020 · 8 comments

Comments

@johnnavaj
Copy link

Screenshot 2020-10-21 at 6 49 49 PM

@jim-wilson
Copy link
Collaborator

sim-core.c includes stdlib.h, and stdlib.h declares free. So this is odd. I don't have access to a mac so I can't try to reproduce.

I do know that building on a mac requires a few extra steps, as you have to use GNU tools instead of default Mac tools, e.g. gsed instead of sed, gtar instead of tar, etc. SiFive builds our toolchains on macos, and we have a makefile to handle this. You might want to try looking at github.com/sifive/freedom-tools to see how it makes the macos build work. I don't think that this is related to the error that you got though.

@johnnavaj
Copy link
Author

johnnavaj commented Oct 22, 2020

Hi jim ,
Looks like free has been moved from stdlib.h to _malloc.h hence this throws this . So looks like the CTL for Mac OS has been updated from the last version I was using. ( Which had free in stdlib.h). The definition is different too.

So someone will have to update this.

@johnnavaj
Copy link
Author

Using prebuilts for now, I mainly wanted to build a soft float capable toolchain so ran into this. Seems that this toolchain was entirely tested and verified for OS X ,so can't really say between the resource difference between Catalina and OS X either in terms of the GNU tools etc provided by the CTL.

@jim-wilson
Copy link
Collaborator

The ISO C standard says that free is declared in stdlib.h. There is something wrong with your system if it isn't there. Though maybe something needs to be enabled or defined for stdlib.h to include _malloc.h?

@tyfkda
Copy link

tyfkda commented Nov 11, 2020

@johnnavaj
I have encountered same problem.
I think it is caused because riscv-gdb submodule is old.
When I use newer one, I have succeeded to make in this repository.

@jim-wilson could you please take a look #769 ? Thanks.

@johnnavaj
Copy link
Author

@tyfkda Yes I can confirm this , looks like the gdb needs a bump in its submodule.

@tyfkda
Copy link

tyfkda commented Nov 20, 2020

@johnnavaj I think this issue is solved #776

@johnnavaj
Copy link
Author

@tyfkda thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants