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

win11下编译异常 #5051

Closed
Dozingfiretruck opened this issue May 4, 2024 · 63 comments
Closed

win11下编译异常 #5051

Dozingfiretruck opened this issue May 4, 2024 · 63 comments
Labels
Milestone

Comments

@Dozingfiretruck
Copy link

Xmake 版本

2.9.1

操作系统版本和架构

win11

描述问题

win10下编译正常,win11下报 ar.exe: invalid option -- @

期待的结果

正常编译

工程配置

仓库地址 : https://gitee.com/openLuat/luatos-soc-2024

附加信息和错误日志

xmake -vD记录.txt

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Compilation exception under win11

@waruqi
Copy link
Member

waruqi commented May 5, 2024

编译不过

error: @programdir\core\main.lua:329: @programdir\actions\build\main.lua:148: @programdir\modules\async\runjobs.lua:322: @programdir\modules\private\action\build\object.lua:91: @programdir\modules\core\tools\gcc.lua:886: ..\..\interface\src\luat_mobile_ec7xx.c: In function 'luat_mobile_set_apn_auth_inf':
..\..\interface\src\luat_mobile_ec7xx.c:367:9: warning: implicit declaration of function 'psSetCGAUTH'; did you mean 'psGetCGAUTH'? [-Wimplicit-function-declaration]
  367 |  return psSetCGAUTH(PS_DIAL_REQ_HANDLER, &req);
      |         ^~~~~~~~~~~
      |         psGetCGAUTH
..\..\interface\src\luat_mobile_ec7xx.c: In function 'luat_mobile_config':
..\..\interface\src\luat_mobile_ec7xx.c:944:7: error: 'MOBILE_CONF_RESET_TO_FACTORY' undeclared (first use in this function)
  944 |  case MOBILE_CONF_RESET_TO_FACTORY:
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\interface\src\luat_mobile_ec7xx.c:944:7: note: each undeclared identifier is reported only once for each function it appears in
stack traceback:

@Dozingfiretruck
Copy link
Author

MOBILE_CONF_RESET_TO_FACTORY

luatos仓库没pull最新的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


MOBILE_CONF_RESET_TO_FACTORY

The luatos warehouse does not pull the latest one

@waruqi
Copy link
Member

waruqi commented May 6, 2024

有点怪,它的 help 里面说了 支持 @file 但还是没去处理。这里用 ar.exe @args.txt 是为了绕过 win 上命令行长度的限制,你这 obj files 太多了,命令行过长。

c376454\bin\../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ar.exe: invalid option -- @

  @<file>      - read options from <file>

@Dozingfiretruck
Copy link
Author

有点怪,它的 help 里面说了 支持 @file 但还是没去处理。这里用 ar.exe @args.txt 是为了绕过 win 上命令行长度的限制,你这 obj files 太多了,命令行过长。

c376454\bin\../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ar.exe: invalid option -- @

  @<file>      - read options from <file>

有点值得注意的是只有win11下会这样,win10下没问题

@waruqi
Copy link
Member

waruqi commented May 6, 2024

那就不知道了,你可以先本地测下 为啥 win11 上 ar.exe @file 不支持

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Then I don’t know. You can test it locally first. Why is ar.exe @file not supported on win11?

@Dozingfiretruck
Copy link
Author

那就不知道了,你可以先本地测下 为啥 win11 上 ar.exe @file 不支持

看来不是win11的问题,可能是环境问题,今天有一个客户win10系统也出现了这个问题,大部分电脑都是没问题的,我这里也无法复现,但是有几个客户的环境会出现这个问题,系统是最新版本win10/win11,

@Dozingfiretruck
Copy link
Author

那就不知道了,你可以先本地测下 为啥 win11 上 ar.exe @file 不支持

看来不是win11的问题,可能是环境问题,今天有一个客户win10系统也出现了这个问题,大部分电脑都是没问题的,我这里也无法复现,但是有几个客户的环境会出现这个问题,系统是最新版本win10/win11,没看出来环境异常

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Then I don’t know. You can test it locally first. Why is ar.exe @file not supported on win11?

It seems that it is not a problem with win11, it may be an environmental problem. Today, a customer's win10 system also has this problem. Most computers have no problem. I can't reproduce it here, but there are several customers who have this problem. Problem, the system is the latest version win10/win11,

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Then I don’t know. You can test it locally first. Why is ar.exe @file not supported on win11?

It seems that it is not a problem with win11, it may be an environmental problem. Today, a customer's win10 system also encountered this problem. Most computers have no problem. I can't reproduce it here, but it will occur in several customers' environments. For this problem, the system is the latest version win10/win11, and there is no abnormality in the environment.

@waruqi
Copy link
Member

waruqi commented May 8, 2024

是这个 patch 改出来的问题,#5015

gcc-ar.exe 不支持 @file ,但是 ar.exe 支持,但是之前改成了优先走 gcc-ar 了,为了支持 lto

waruqi added a commit that referenced this issue May 8, 2024
@waruqi
Copy link
Member

waruqi commented May 8, 2024

稍微改了下,应该可以了,不过目前不是完美方案,只能针对 gcc-ar 禁用 @file ,但是如果命令行过长,可能会有问题。

如果要同时兼容支持 gcc-ar/ltoar @file ,不太好搞。

先试试吧。xmake update -s dev

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After a slight change, it should be possible. However, it is not a perfect solution at present. @file can only be disabled for gcc-ar, but if the command line is too long, there may be problems.

If you want to be compatible with gcc-ar/lto and ar @file at the same time, it is not easy to do.

Try it first. xmake update -s dev

@waruqi waruqi added this to the v2.9.2 milestone May 8, 2024
@waruqi waruqi closed this as completed May 8, 2024
@Dozingfiretruck
Copy link
Author

稍微改了下,应该可以了,不过目前不是完美方案,只能针对 gcc-ar 禁用 @file ,但是如果命令行过长,可能会有问题。

如果要同时兼容支持 gcc-ar/ltoar @file ,不太好搞。

先试试吧。xmake update -s dev

客户反馈可以了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After a slight change, it should work. However, it is not a perfect solution at present. @file can only be disabled for gcc-ar, but if the command line is too long, there may be problems.

If you want to be compatible with gcc-ar/lto and ar @file at the same time, it is not easy to do.

Try it first. xmake update -s dev

Customer feedback is available

@Dozingfiretruck
Copy link
Author

Dozingfiretruck commented May 11, 2024

还是不行,之前可以编译的项目反而无法编译了。。。一些大一点的项目连接时候会长一些,完全无法编译了
image
arm-none-eabi-gcc-ar 是支持 @file 的,大部分环境下编译没有问题,我这里没有复现过,还是觉得是其他原因影响的

@waruqi waruqi reopened this May 11, 2024
@waruqi
Copy link
Member

waruqi commented May 11, 2024

arm-none-eabi-gcc-ar 是支持 https://github.com/file 的,大部分环境下编译没有问题,我这里没有复现过

我这里是必现的,gcc-ar 似乎就是处理不了 @file

@Dozingfiretruck
Copy link
Author

arm-none-eabi-gcc-ar 是支持 https://github.com/file 的,大部分环境下编译没有问题,我这里没有复现过

我这里是必现的,gcc-ar 似乎就是处理不了 @file

你那里应该和客户的情况一样,但是大部分用户没有报这个问题,我这里也编译正常,相关工程以前也一直这么用的已经有两年了

@waruqi
Copy link
Member

waruqi commented May 11, 2024

那就没办法了,目前没有更好的办法,同时兼容 @filelto

  1. ar 支持 @file, 比较稳定,但是不支持 lto
  2. gcc-ar 部分机器不支持 @file
  3. gcc-ar 去掉 @file ,命令过长会失败

你可以自己想下有没有兼容办法,反正目前我这想不到更好的办法同时支持这三种 case 。。除非有办法让 gcc-ar 稳定支持 @file

@Dozingfiretruck
Copy link
Author

ar 支持 @file, 比较稳定,但是不支持 lto?我这里一直在用lto并没有问题呀

@Dozingfiretruck
Copy link
Author

我这里重装了2.9.1,用之前有dev编译的工程直接编译也会出现提示不支持@ 删除掉 build缓存和.xmake之后在编译就正常了,应该还是有bug的

@waruqi
Copy link
Member

waruqi commented May 11, 2024

ar 支持 @file, 比较稳定,但是不支持 lto?我这里一直在用lto并没有问题呀

#5015

或者你有办法在使用 ar 时候,也能兼容处理掉这个问题,那也可以

@Dozingfiretruck
Copy link
Author

我可以提供我的环境给你,我们这边也有ci,都是可以编译的 https://github.com/openLuat/luatos-soc-2024/actions/runs/8905334030/job/24455883537

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


ar supports @file, which is relatively stable, but does not support lto? I have been using lto here and there is no problem.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I have reinstalled 2.9.1 here. When directly compiling the project that was compiled by dev before, a prompt will appear that @ is not supported. After deleting the build cache and .xmake, the compilation will be normal. There should still be a bug.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


ar supports @file, which is relatively stable, but does not support lto? I have been using lto here and there is no problem.

See #5015

Or if you have a way to deal with this problem compatible with ar when using ar, that's fine too

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I have reinstalled 2.9.1 here. When directly compiling a project that was compiled with dev before, a message will appear that @ is not supported. After deleting the build cache and .xmake, the compilation will be normal. There should still be bugs.

You have to clear the cache between different versions, and cache compatibility is not guaranteed.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I can provide you with my environment. We also have ci here, which can be compiled https://github.com/openLuat/luatos-soc-2024/actions/runs/8905334030/job/24455883537

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I can provide you with my environment. We also have ci here, which can be compiled https://github.com/openLuat/luatos-soc-2024/actions/runs/8905334030/job/24455883537

Just because your environment is okay, it doesn't mean that other people's environments are okay, and the tool chains they use are different from yours, but it can only be handled in a unified way here, and it's impossible to break it down in such detail.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


ar supports @file, which is relatively stable, but does not support lto? I have been using lto here and there is no problem.

See #5015

Or if you have a way to handle this problem compatible with ar, that's fine too

We use gcc-arm-none-eabi 10, which should be somewhat different from the Linux cross-compilation tool chain.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I can provide you with my environment. We also have ci here, which can be compiled https://github.com/openLuat/luatos-soc-2024/actions/runs/8905334030/job/24455883537

Your environment is OK, but it doesn’t mean that other people’s environments are OK, and the tool chains they use are different from yours, but it can only be handled in a unified way here, and it is impossible to break it down in such detail.

No, they are all our sdk, the projects are the same, the tool chains are the same, and most of them can be compiled. This is considered a bug. There is no difference in the tool chains.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


No, they are all our sdk, the projects are the same, the tool chains are the same, and most of them can be compiled. This is considered a bug. There is no difference in the tool chains.

I don’t know which bug you are talking about now. Don’t mix the same issues together.

Then there is no way, there is currently no better way, compatible with both @file and lto

  1. ar supports @file, which is relatively stable, but does not support lto
  2. gcc-ar Some machines do not support @file
  3. Remove @file from gcc-ar. If the command is too long, it will fail.

You can think about whether there is a compatible way. Anyway, I can't think of a better way to support these three cases at the same time. . Unless there is a way to make gcc-ar stably support @file

If this is the problem you are talking about, what I just said above is quite clear. I don’t have a good way to make everything compatible at the moment. .

I have reinstalled 2.9.1 here. When compiling directly with a project compiled by dev before, a message will appear that @ is not supported. After deleting the build cache and .xmake, the compilation will be normal. There should still be bugs.

You need to clear the cache between different versions, and cache compatibility is not guaranteed.

If this is the problem you are talking about, as I just said, you just need to clear the cache. .

ar supports @file, which is relatively stable, but does not support lto? I have been using lto here and there is no problem.

If this is what you are talking about, I just said that their gcc toolchain encountered lto problems, and they later changed it to gcc-ar. .

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The problem now is that a small number of users cannot compile the same sdk, and the @ problem is reported, but most people can compile it. Some gcc-ar machines do not support @file. I don’t understand this sentence. This is the support of the tool chain. Why? Could it be that the machine doesn't support it? Moreover, both of my machine environments are reproduced. It cannot be that my environment has changed back and forth.

In addition, regarding the lto issue, there is not only one gcc tool chain. The Linux application platform and the bare metal platform tool chain are not the same. Gcc cannot be all the same just because of the tool chain problem of Linux applications. Bare metal ones are generally used for microcontrollers, and Linux applications are generally used for The A core compiles the Linux kernel and applications. They are inherently different and should not be bound to the same processing. The Linux tool chain does not support it, which does not mean that None does not support it either.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The problem now is that a small number of users cannot compile the same sdk, and the @ problem is reported, but most people can compile. Some gcc-ar machines do not support @file. I don’t understand this sentence. This is the support of the tool chain. Why is the machine not supported? Moreover, both of my machine environments are reproduced. It cannot be that my environment has changed back and forth.

It's not what you said. Your customer has this problem. Is this okay for you? Specifically why it is not supported sometimes. I have to ask gcc-ar about this. Anyway, I must have found that gcc-ar cannot handle @file for the time being. I can't find the reason or solution.

arm-none-eabi-gcc-ar supports https://github.com/file. There is no problem compiling in most environments. I have not reproduced it here.

I must see it here, gcc-ar just can’t seem to handle @file

Your situation should be the same as the customer's, but most users have not reported this problem. It compiles normally here, and the related projects have been used in this way for two years.

In addition, regarding the lto issue, there is not only one gcc tool chain, the Linux application platform and the bare metal platform tool chain are not the same. Just because of the tool chain problem of Linux applications, gcc should not be all the same. Bare metal ones are generally used for microcontrollers, and Linux applications are generally used. Compiling the Linux kernel and applications on the A core are inherently different and should not be bound to the same process. The Linux tool chain does not support it, which does not mean that none does not support it either.

So, I just said that lto in your toolchain is OK, but it does not mean that lto in other users' toolchains is also OK, but it is impossible to classify it in such detail in xmake. You can also classify none, linux and various gcc cross toolchain versions one by one. Compatible, it can only be processed uniformly, either using ar.exe or gcc-ar.exe. .

But no matter which one you use, either you have a problem, or other users have a problem. . I also said that at present I have no good solution, all of which are compatible with various cases of each user's toolchain. .

Even if I change it back now and use ar.exe again, the user before going back will have issues again. .

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


They are different and should not be bound to the same processing. The Linux tool chain does not support it, which does not mean that none does not support it either.

There are so many Linux toolchain versions on the market, and it is impossible for xmake to handle them all internally. It can only handle them in a unified way that can cover 90% of the case processing. . Keep the impact to a minimum. .

If you want to handle each specific Linux cross toolchain in a more fine-grained manner, only user-defined toolchains can be used instead of letting xmake make various internal changes to adapt to one of the toolchains. . .

  1. ar supports @file, which is relatively stable, but some users’ toolchain ar does not support lto
  2. The gcc-ar local machine user environment does not support @file
  3. Remove @file from gcc-ar. If the command is too long, it will fail.

Anyway, the current situation is just these three. I can't make them all compatible, and I can't deal with each different version of gcc cross toolchain one by one. .

There are currently two solutions:

  1. In the above three situations, evaluate the most common case. I will change it to ensure that at least 90% of users will not break. Then you can customize the toolchain to solve the remaining 10% of cases.
  2. Help analyze the reasons and directly solve the problem of gcc-ar.exe's processing of @file and ar.exe's processing of lto. It is of course the best to solve it directly and compatiblely.

@waruqi
Copy link
Member

waruqi commented May 11, 2024

目前能想到的一种完全兼容方案,#5015 (comment) 但具体是否可靠,我暂时不确定,即使可以这么搞,估计也得废几天时间。。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


A fully compatible solution that can be thought of at present, #5015 (comment) But I am not sure whether it is reliable for the moment. Even if it can be done this way, it will probably be useless. A few days. .

@Dozingfiretruck
Copy link
Author

本就是不同的,不应该绑定一定一样的处理,linux工具链不支持也不代表none的也不支持

市面上,这么多 linux toolchain 版本了,xmake 内部是不可能全部挨个处理的,只能统一一种 能够覆盖到 90% case 处理方式来处理。。使得影响面保持最小。。要么用 gcc-ar 要么用 ar @file

如果要更细粒度处理 每个特定 linux cross toolchain,只有用户自定义 toolchain,而不是让 xmake 内部去各种改,适配其中某种 toolchain 。。。

  1. ar 支持 @file, 比较稳定,但是部分用户的 toolchain ar 不支持 lto
  2. gcc-ar 部分机用户环境不支持 @file
  3. gcc-ar 去掉 @file ,命令过长会失败

反正目前的情况,就是这三种,我这边没法全部兼容,也没法对每个不同版本的 gcc cross toolchain 挨个处理。。

目前的解决办法就两种,

  1. 上面三种情况,评估最容易遇到的 case ,我改过去,至少能保证 90% 的用户不会 break,然后剩下 10% 的 case ,你们自定义 toolchain 来解决
  2. 帮忙一起分析下原因,直接解决 gcc-ar.exe 对 @file 的处理,以及 ar.exe 对 lto 的处理问题,直接能兼容解决当然是最好的。

1,嵌入式使用的是裸机工具链,和linux完全分开的没有关系,不管是ARM还是其他厂家发布GCC时候都是分开的版本,完全独立的,因为完全是两个方向
2,好的,我这里没法复现,我和客户沟通下看能不能提供环境我测试下,我这里,我们公司其他同事,还有ci上都没法复现,目前只有两个客户和你哪里能稳定出现此问题

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


They are inherently different and should not be bound to the same processing. The Linux tool chain does not support it, which does not mean that none does not support it either.

With so many Linux toolchain versions on the market, it is impossible for xmake to handle them all internally. It can only handle them in a unified way that can cover 90% of the case processing. . Keep the impact to a minimum. . Either use gcc-ar or ar @file

If you want to handle each specific Linux cross toolchain in a more fine-grained manner, only user-defined toolchains can be used instead of letting xmake make various internal changes to adapt to one of the toolchains. . .

  1. ar supports @file, which is relatively stable, but some users’ toolchain ar does not support lto
  2. gcc-ar partial machine user environment does not support @file
  3. gcc-ar removes @file. If the command is too long, it will fail.

Anyway, the current situation is these three. I can’t make them all compatible, and I can’t handle each different version of gcc cross toolchain one by one. .

There are currently two solutions:

  1. In the above three situations, evaluate the case that is most likely to be encountered. I will change it to ensure that at least 90% of users will not break. Then you can customize the toolchain to solve the remaining 10% of cases.
  2. Please help analyze the reasons and directly solve the problem of gcc-ar.exe's processing of @file and ar.exe's processing of lto. It is of course the best to solve it directly and with compatibility.
  1. Embedded uses a bare-metal tool chain, which has nothing to do with Linux. When ARM or other manufacturers release GCC, they are separate versions, completely independent, because they are completely in two directions.
  2. Okay, I can’t reproduce it here. I will communicate with the customer to see if they can provide an environment for me to test. I can’t reproduce it here, other colleagues in our company, and CI. Currently, there are only two customers and Where can you stabilize this problem?

@Dozingfiretruck
Copy link
Author

问题基本了解为啥了,客户下载的不是发行版,所以引入了这个问题,如果回退 ar 就没问题,lto问题只存在于老版本的linux编译工具,我们使用的10以上的裸机编译工具没有此问题

所以lto问题算是老版本工具链bug,如果要支持的话是否可以根据linux gcc版本进行兼容处理?
另外大佬上面说的完全兼容方案也行,不过应该比较费劲吧

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I basically understand the reason for the problem. The customer downloaded is not a distribution version, so this problem is introduced. If you roll back ar, there will be no problem. The lto problem only exists in the old version of linux compilation tools. The bare metal compilation tools we use above 10 do not have it. this question

So the lto problem is considered a bug in the old version of the tool chain. If it is to be supported, can it be compatible with the Linux gcc version?
In addition, the fully compatible solution mentioned above by the boss will also work, but it should be more laborious.

@waruqi
Copy link
Member

waruqi commented May 11, 2024

问题基本了解为啥了,客户下载的不是发行版,所以引入了这个问题,如果回退 ar 就没问题,lto问题只存在于老版本的linux编译工具,我们使用的10以上的裸机编译工具没有此问题

所以lto问题算是老版本工具链bug,如果要支持的话是否可以根据linux gcc版本进行兼容处理? 另外大佬上面说的完全兼容方案也行,不过应该比较费劲吧

根据版本也可以,关键是得先确定是哪个版本以下不支持 lto

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I basically understand the cause of the problem. The customer downloaded is not a distribution version, so this problem is introduced. If you roll back ar, there will be no problem. The lto problem only exists in old versions of linux compilation tools. We use more than 10 bare metal compilation tools. No such problem

So the lto problem is considered a bug in the old version of the tool chain. If it is to be supported, can it be compatible with the Linux gcc version? In addition, the fully compatible solution mentioned above by the boss will also work, but it should be more laborious.

It can also depend on the version. The key is to first determine which version does not support lto.

@waruqi
Copy link
Member

waruqi commented May 11, 2024

而且即使根据版本切,低版本 gcc 下用 gcc-ar 。。不还是会遇到你这的问题。。低版本下还是没法完全兼容。。。仅仅只是不影响高版本了,限制了影响范围。。

应该是根据版本判断,高版本还是用 ar 不用任何处理,。低版本走 ar --plugin lto_plugin.so 去传参兼容。。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


And even if it depends on the version, gcc-ar is used for lower versions of gcc. . No, I will still encounter your problem. . It is still not fully compatible with lower versions. . . It just doesn't affect higher versions, which limits the scope of influence. .

It should be judged based on the version. For higher versions, use ar without any processing. For lower versions, use ar --plugin lto_plugin.so to pass parameters for compatibility. .

@Dozingfiretruck
Copy link
Author

稍微改了下,应该可以了,不过目前不是完美方案,只能针对 gcc-ar 禁用 @file ,但是如果命令行过长,可能会有问题。

如果要同时兼容支持 gcc-ar/ltoar @file ,不太好搞。

先试试吧。xmake update -s dev

好的,和客户说了,等客户测试一下,这个只有部分客户电脑会出现问题,

而且即使根据版本切,低版本 gcc 下用 gcc-ar 。。不还是会遇到你这的问题。。低版本下还是没法完全兼容。。。仅仅只是不影响高版本了,限制了影响范围。。

应该是根据版本判断,高版本还是用 ar 不用任何处理,。低版本走 ar --plugin lto_plugin.so 去传参兼容。。

是的,这个方法可以

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After a slight change, it should work. However, it is not a perfect solution at present. @file can only be disabled for gcc-ar, but if the command line is too long, there may be problems.

If you want to be compatible with gcc-ar/lto and ar @file at the same time, it is not easy to do.

Try it first. xmake update -s dev

Okay, I told the customer that I will wait for the customer to test it. Only some customers' computers will have problems.

Even if it depends on the version, gcc-ar is used for lower versions of gcc. . No, I will still encounter your problem. . It is still not fully compatible with lower versions. . . It just doesn't affect higher versions, which limits the scope of influence. .

It should be judged based on the version. For higher versions, ar should be used without any processing. For lower versions, use ar --plugin lto_plugin.so to pass parameters for compatibility. .

Yes, this method works

@waruqi
Copy link
Member

waruqi commented May 11, 2024

现在这个 patch 应该差不多了 #5087

@Dozingfiretruck
Copy link
Author

现在这个 patch 应该差不多了 #5087

我这里测试可以正常编译,如果有客户反馈有问题我再继续反馈,先关掉了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


This patch should be almost ready now #5087

My test here can compile normally. If there is any customer feedback and there are problems, I will continue to provide feedback and turn it off first.

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

No branches or pull requests

3 participants