Compilation problem in FreeBSD

Skip to first unread message

Guido Falsi

Dec 21, 2020, 4:10:35 AM12/21/20

I'm experiencing a strange error while trying to compile spidermonkey
78.6 on FreeBSD.

For context I'm trying to compile ti as it is embedded in the 0ad game [1].

I get a strange error when linking:

ld: error: undefined symbol: environ
>>> referenced by std.cys9k1p5-cgu.3
in archive

In FreeBSD the environ symbol is a static global, and is not defined in
libc. I understand it's defined in the crt.o object which is linked
automatically to executables, but, since in this case we are building a
library, is not included.

I know very little about rust but the problem seems to be that
libjsrust.a references environ and causes the problem. Can you give me
some help or a pointer where the issue could be? Grepping for "environ"
did not help much unluckily.

Thanks in advance!

Guido Falsi <>
Reply all
Reply to author
0 new messages