luoliwoshang / llgo

A Go compiler based on LLVM in order to better integrate Go with the C ecosystem including Python
Apache License 2.0
2 stars 0 forks source link

panic: failed to generate some dylib paths: failed to find any libraries #126

Open tsingbx opened 3 weeks ago

tsingbx commented 3 weeks ago
{
    "name": "libcurl",
    "cflags": "",
    "include": null,
    "libs": "-lcurl",
    "trimPrefixes": [],
    "replPrefixes": [],
    "cplusplus": false
}
tsingbx commented 3 weeks ago
{
    "name": "libexslt",
    "cflags": "",
    "include": null,
    "libs": "-lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm -lxml2",
    "trimPrefixes": [],
    "replPrefixes": [],
    "cplusplus": false
}
luoliwoshang commented 3 weeks ago

对于这种pkg-config没有给出对应路径的--libs,即为从存在于系统默认搜索路径中的链接库。目前是对于Linux这里做了适配,对于macos下还需要看一下系统的默认搜索路径是哪些,怎么获取。

https://github.com/goplus/llgo/blob/e92a0eb90114a3b0c9efd0f6ad6e17c9c728ebb2/chore/_xtool/llcppsymg/symbol/symbol.go#L101-L133