You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/troubleshooting.md
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,26 @@ The build environment provided by `BinaryBuilder` is a `x86_64-linux-musl`, and
103
103
./foreign.exe: line 1: syntax error: unexpected end of file (expecting ")")
104
104
```
105
105
106
-
This is one of worst cases when cross-compiling, and there isn't a simple solution. You have to look into the build process to see if running the executable can be skipped (see for example the patch to not run `dot` in [#351](https://github.com/JuliaPackaging/Yggdrasil/pull/351)), or replaced by something else. If the executable is a compile-time only utility, try to build it with the native compiler (see for example the patch to build a native `mkdefs` in [#351](https://github.com/JuliaPackaging/Yggdrasil/pull/351))
106
+
This is one of worst cases when cross-compiling, and there isn't a simple solution. You have to look into the build process to see if running the executable can be skipped (see for example the patch to not run `dot` in [Yggdrasil#351](https://github.com/JuliaPackaging/Yggdrasil/pull/351)), or replaced by something else. If the executable is a compile-time only utility, try to build it with the native compiler (see for example the patch to build a native `mkdefs` in [Yggdrasil#351](https://github.com/JuliaPackaging/Yggdrasil/pull/351))
107
+
108
+
## Musl Linux
109
+
110
+
Compiling for Musl platforms can sometimes fail with the error message
111
+
112
+
```
113
+
/opt/x86_64-linux-musl/x86_64-linux-musl/sys-root/usr/include/stdlib.h:99:5: error: from previous declaration ‘int posix_memalign(void**, size_t, size_t)’
114
+
int posix_memalign (void **, size_t, size_t);
115
+
^
116
+
```
117
+
118
+
This is due to a bug in older versions of GCC targeting this libc, see [BinaryBuilder.jl#387](https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/387) for more details.
119
+
There are two options to solve this issue:
120
+
121
+
* require GCC 6 by using `build_tarballs(...; preferred_gcc_version=v"6")`.
122
+
This may be the simplest option in some cases.
123
+
See for example [Yggdrasil#3974](https://github.com/JuliaPackaging/Yggdrasil/pull/3974)
124
+
* if using older versions of GCC is important for wider compatibility, you can apply [this patch](https://github.com/JuliaPackaging/Yggdrasil/blob/48ac662cd53e02aff0189c81008874a04f7172c7/Z/ZeroMQ/bundled/patches/mm_malloc.patch) to the build toolchain.
125
+
See for example [ZeroMQ](https://github.com/JuliaPackaging/Yggdrasil/blob/48ac662cd53e02aff0189c81008874a04f7172c7/Z/ZeroMQ/build_tarballs.jl#L20-L26) recipe.
107
126
108
127
## PowerPC Linux
109
128
@@ -142,7 +161,7 @@ make -j${nprocs}
142
161
make install
143
162
```
144
163
145
-
See for example [#354](https://github.com/JuliaPackaging/Yggdrasil/pull/354) and [#982](https://github.com/JuliaPackaging/Yggdrasil/pull/982).
164
+
See for example [Yggdrasil#354](https://github.com/JuliaPackaging/Yggdrasil/pull/354) and [Yggdrasil#982](https://github.com/JuliaPackaging/Yggdrasil/pull/982).
146
165
147
166
### ```undefined reference to `environ'```
148
167
@@ -182,7 +201,7 @@ make -j${nprocs} "${FLAGS[@]}"
182
201
make install
183
202
```
184
203
185
-
Note that setting `LDFLAGS=-no-undefined` before `./configure` would make this fail because it would run a command like `cc -no-undefined conftest.c`, which upsets the compiler). See for example [#170](https://github.com/JuliaPackaging/Yggdrasil/pull/170), [#354](https://github.com/JuliaPackaging/Yggdrasil/pull/354).
204
+
Note that setting `LDFLAGS=-no-undefined` before `./configure` would make this fail because it would run a command like `cc -no-undefined conftest.c`, which upsets the compiler). See for example [Yggdrasil#170](https://github.com/JuliaPackaging/Yggdrasil/pull/170), [Yggdrasil#354](https://github.com/JuliaPackaging/Yggdrasil/pull/354).
186
205
187
206
### Libtool refuses to build shared library because '-lmingw32' is not a real file
0 commit comments