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

Failed to compile iPXE #201

Closed
a1ive opened this issue Jun 6, 2020 · 9 comments
Closed

Failed to compile iPXE #201

a1ive opened this issue Jun 6, 2020 · 9 comments

Comments

@a1ive
Copy link
Contributor

a1ive commented Jun 6, 2020

cd IPXE/
bash buildipxe.sh

报错:

core/sanboot.c: 在函数‘sandev_undescribe’中:
core/sanboot.c:733:26: 错误:array subscript ‘(<未知>) + 4294967295’ is outside the bounds of an interior zero-length array ‘struct san_path[0]’ [-Werror=zero-length-bounds]
733 | sanpath = &sandev->path[i];
| ~~~~~~~~~~~~^~~
In file included from core/sanboot.c:45:
include/ipxe/sanboot.h:89:18: 附注:while referencing ‘path’
89 | struct san_path path[0];
| ^~~~
core/sanboot.c:733:26: 错误:array subscript ‘(<未知>) + 4294967295’ is outside the bounds of an interior zero-length array ‘struct san_path[0]’ [-Werror=zero-length-bounds]
733 | sanpath = &sandev->path[i];
| ~~~~~~~~~~~~^~~
In file included from core/sanboot.c:45:
include/ipxe/sanboot.h:89:18: 附注:while referencing ‘path’
89 | struct san_path path[0];
| ^~~~
core/sanboot.c: 在函数‘sandev_free’中:
core/sanboot.c:124:25: 错误:array subscript ‘(<未知>) + 4294967295’ is outside the bounds of an interior zero-length array ‘struct san_path[0]’ [-Werror=zero-length-bounds]
124 | uri_put ( sandev->path[i].uri );
| ~~~~~~~~~~~~^~~
In file included from core/sanboot.c:45:
include/ipxe/sanboot.h:89:18: 附注:while referencing ‘path’
89 | struct san_path path[0];
| ^~~~
[BUILD] bin/uart.o
[BUILD] bin/uri.o
[BUILD] bin/uuid.o
[BUILD] bin/ventoy_dummy.o
core/sanboot.c: 在函数‘alloc_sandev’中:
core/sanboot.c:845:26: 错误:array subscript ‘(count) + 4294967295’ is outside the bounds of an interior zero-length array ‘struct san_path[0]’ [-Werror=zero-length-bounds]
845 | sanpath = &sandev->path[i];
| ~~~~~~~~~~~~^~~
In file included from core/sanboot.c:45:
include/ipxe/sanboot.h:89:18: 附注:while referencing ‘path’
89 | struct san_path path[0];
| ^~~~

GCC 版本: 10.1.0
GCC 9 可以正常编译。

@ventoy
Copy link
Owner

ventoy commented Jun 6, 2020

我没用过这么高版本的gcc, 我本地的还是 4.8

你试试直接编译 https://github.com/ipxe/ipxe 官方最新的版本看看,
cd ipxe-master/src
make bin/ipxe.iso

如果能编译通过,后面可以同步一下。

@a1ive
Copy link
Contributor Author

a1ive commented Jun 6, 2020

官方的也不行,同样是 -Werror=array-bounds 错误。

@ventoy
Copy link
Owner

ventoy commented Jun 6, 2020

那给官方提个issue吧。

@a1ive
Copy link
Contributor Author

a1ive commented Jun 6, 2020

把 struct san_device 里面的 struct san_path path[0] 放到最后面好像就可以了。
#202

@ventoy
Copy link
Owner

ventoy commented Jun 6, 2020

那照道理官方的版本应该OK呀, 后面那几个变量是我自己加的。

@a1ive
Copy link
Contributor Author

a1ive commented Jun 6, 2020

官方版本报错的位置是在一个驱动里面,你的版本把那个驱动删了。

@ventoy
Copy link
Owner

ventoy commented Jun 6, 2020

@a1ive a1ive closed this as completed Jun 6, 2020
@samysousa
Copy link

How do you use the embeded IPXE ?
Can you Boot to IPXE and then use it`s menus and options to boot on HTTP (A feature of IPXE)

I also tried just putting IPXE.ISO and it will not BOOT in Ventoy

I know IPXE is part of Ventoy, but how do you use it ?

@ventoy
Copy link
Owner

ventoy commented Jun 21, 2020

Ventoy only use the int13 hook feature in iPXE and other part of iPXE was not used even not built.

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

No branches or pull requests

3 participants