Skip to content

Troubles with macosx bundle distribution and environ global #965

@gradha

Description

@gradha

A binary I had working on MacOSX 10.8 fails to load on 10.7 and previous due to the global environ variable being accessed directly. The problem was already raised and fixed long ago in #17 by patching the address of the variable with a call to _NSGetEnviron.

However, during commit 53de466 the fix was disabled through the use of defined(createNimRtl) or defined(useNimRtl) guards.

When I try to compile my project with -d:createNimRtl I get:

lib/system/inclrtl.nim(24, 11) Error: nimrtl must be built as a library!

When I try to compile my project with -d:useNimRtl I get:

Error: system module needs 'reprAny'

It is not clear to me how is one to reach the correct code for macosx, or why it needed guards in first place. Is removing guards ok to fix this or should compilation with any of those defines be made to work again?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions