ruki
ruki
> 不采用方案2是因为namespace的设计出发点问题吗?我这边的看法是,如果namespace是为了隔离同名的target, rule等,那我们会希望xmake也“自动”能(或者通过某个policy/rule开启)帮忙避免同名target产生同名输出的问题(这个问题在关闭了intermediate directory后更加明显了,同名输出会互相覆写) namespace 已经用了 `::` 这种自动不会做,自己手动通过 set_basename 调整,自动处理要处理很多的细节,弄的不好,反而引入更多的坑。 1. 如果这两 target 不在一个依赖链上,不会冲突,这个时候不用改名 2. 如果一个依赖链上存在冲突,才需要自动改文件名 3. 如果自动改了文件名,又会影响 `xmake install` 的安装文件名,到时候用户又是一堆 issues 过来,自动命名不可控,不是所有用户都认可这种需求,有的人不想改,有的认为 xxx-utils.a ,那 xmake 不管怎么自动命名,总会有一部分用户不满足需求会提 issues 过来。 所以还不如用户手动...
其实解决这个问题的最好办法,不是重命名,而是用全路径库文件替代 -L/-l 去做 link ,不过这种方式,不一定所有链接器都支持,我暂时只对 gcc/clang/link.exe 做了支持,可以尝试下这个 patch https://github.com/xmake-io/xmake/pull/7011 可通过 `build.link_target_with_fullpath` 策略配置开启或者关闭,目前默认开启了,先观察下兼容性如何,如果不行,就默认关闭,遇到冲突了,手动开。
> 其实解决这个问题的最好办法,不是重命名,而是用全路径库文件替代 -L/-l 去做 link ,不过这种方式,不一定所有链接器都支持,我暂时只对 gcc/clang/link.exe 做了支持,可以尝试下这个 patch > > [#7011](https://github.com/xmake-io/xmake/pull/7011) > > 可通过 `build.link_target_with_fullpath` 策略配置开启或者关闭,目前默认开启了,先观察下兼容性如何,如果不行,就默认关闭,遇到冲突了,手动开。 这种方式实现上目前还存在不少问题,不太好搞,先放着吧。
最近没相关环境,你可以直接来个 pr 过来
这边没法复现,你可以先源码编译 debug 版本 bin core 后,用 gdb 调下,给下对应的栈
你切到 debug 编译试试,看看能否看到完整栈。 ``` ./configure --mode=debug make ```
或者试下用 xmake 去编译带 asan 版本的 bin 看下。 ``` cd core xmake f -m debug --policies=build.sanitizer.address xmake ./build/xmake -- binary file ```
please wait for this patch https://github.com/xmake-io/xmake/pull/5649 then you can add ```lua on_test(function (package) import("lib.detect.find_tool") if package.check_fcsnippets and find_tool("gfortran") then assert(package:check_fcsnippets({test = [[ program hello print *, "Hello World!" end program...
> > /usr/bin/gfortran -c -m64 -isystem /home/runner/.xmake/packages/m/mkl/2022.2.0+8748/49ba34e91b0e47908a2377d1814fc943/include -isystem /home/runner/.xmake/packages/t/tbb/2021.12.0/df9ece8dadfc4b68be28a7546372f41e/include -o /tmp/.xmake1001/240923/_0197CE630E2F4730807622F18DBBE540.o /tmp/.xmake1001/240923/_FBF1AB2116944858B1A7CAC521022F86.f90 > /usr/bin/gfortran -o /tmp/.xmake1001/240923/_0197CE630E2F4730807622F18DBBE540.b /tmp/.xmake1001/240923/_0197CE630E2F4730807622F18DBBE540.o -m64 -Wl,--start-group -lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -Wl,--end-group -L/home/runner/.xmake/packages/m/mkl/2022.2.0+8748/49ba34e91b0e47908a2377d1814fc943/lib -L/home/runner/.xmake/packages/t/tbb/2021.12.0/df9ece8dadfc4b68be28a7546372f41e/lib -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -ltbb -ltbbmalloc -ltbbmalloc_proxy...
> for some reason, the default linker (ld) for the Fortran tests seems to be set to g++. In this case, libstdc++ is used but libstdc++.so.6 seems to be missing...