Skip to content

acl-dev: add package #6957

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

Merged
merged 43 commits into from
Apr 24, 2025
Merged

acl-dev: add package #6957

merged 43 commits into from
Apr 24, 2025

Conversation

luadebug
Copy link
Contributor

@luadebug luadebug commented Apr 21, 2025

Yet I get some errors during running test. I think maybe, it could be resolved by proper sequence of links, something like this:
Expected to work: -lprotocol -lacl_cpp -lfiber_cpp -lfiber -lacl -lz -lpthread -ldl
Wont work: -lfiber -lprotocol -lacl -lfiber_cpp -lacl_cpp -lz -lpthread -ldl

TODO:
LTO fix
FreeBSD iconv

 /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:282:3: error: no matching function for call to 'libiconv'
    282 |                 __iconv(m_iconv, (const char**) &pi, &zi, &po, &zo);
        |                 ^~~~~~~
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:104:27: note: expanded from macro '__iconv'
    104 | #  define __iconv         iconv
        |                           ^~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^~~~~~~~
  /usr/local/include/iconv.h:84:15: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
     84 | extern size_t iconv (iconv_t cd,  char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
        |               ^                   ~~~~~~~~~~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:379:9: error: no matching function for call to 'libiconv'
    379 |                 ret = __iconv(m_iconv, (const char**) &pIn, &nIn, &pOut, &nOut);
        |                       ^~~~~~~
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:104:27: note: expanded from macro '__iconv'
    104 | #  define __iconv         iconv
        |                           ^~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^~~~~~~~
  /usr/local/include/iconv.h:84:15: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
     84 | extern size_t iconv (iconv_t cd,  char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
        |               ^                   ~~~~~~~~~~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:416:4: error: no matching function for call to 'libiconv'
    416 |                         __iconv(m_iconv, (const char**) &pi, &zi, &po, &zo);
        |                         ^~~~~~~
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:104:27: note: expanded from macro '__iconv'
    104 | #  define __iconv         iconv
        |                           ^~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^~~~~~~~
  /usr/local/include/iconv.h:84:15: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
     84 | extern size_t iconv (iconv_t cd,  char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
        |               ^                   ~~~~~~~~~~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:460:4: error: no matching function for call to 'libiconv'
    460 |                         __iconv(m_iconv, (const char**) &pi, &zi, &po, &zo);
        |                         ^~~~~~~
  /root/.xmake/cache/packages/2504/a/acl-dev/v3.6.2/source/lib_acl_cpp/src/stdlib/charset_conv.cpp:104:27: note: expanded from macro '__iconv'
    104 | #  define __iconv         iconv
        |                           ^~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^~~~~~~~
  /usr/local/include/iconv.h:84:15: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
     84 | extern size_t iconv (iconv_t cd,  char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
        |               ^                   ~~~~~~~~~~~~~
  /usr/local/include/iconv.h:82:15: note: expanded from macro 'iconv'
     82 | #define iconv libiconv
        |               ^
  4 errors generated.

If definition of USE_SYS_ICONV appear, I think it might resolve this, since I did not find way to get rid of iconv being gathered from system.

#elif defined(ACL_FREEBSD) && !defined(USE_SYS_ICONV)
		__iconv(m_iconv, (const char**) &pi, &zi, &po, &zo);
#else
		__iconv((iconv_t) m_iconv, &pi, &zi, &po, &zo);
#endif
		return true;

@luadebug luadebug closed this Apr 22, 2025
@luadebug luadebug reopened this Apr 22, 2025
@luadebug luadebug closed this Apr 22, 2025
@luadebug luadebug reopened this Apr 22, 2025
@luadebug luadebug closed this Apr 23, 2025
@luadebug luadebug reopened this Apr 23, 2025
@luadebug
Copy link
Contributor Author

luadebug commented Apr 23, 2025

It seems link order issue is fixed by add_links.

@luadebug
Copy link
Contributor Author

luadebug commented Apr 23, 2025

During snippet check, this appear ld: error: unable to find library -liconv for FreeBSD. Does it need add_deps(libiconv) ?
Yet https://xmake.io/#/manual/package_dependencies?id=packageon_fetch might do not work for FreeBSD as it is has not defined finding for FreeBSD.

@waruqi
Copy link
Member

waruqi commented Apr 24, 2025

建议后面还是搞成 patch 比较好,如果 replace 过多的话

@waruqi waruqi merged commit 9aa4ed6 into xmake-io:dev Apr 24, 2025
73 checks passed
@Issues-translate-bot
Copy link

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


It is better to make a patch later, if too many replaces it

@star-hengxing
Copy link
Contributor

replace 主要用于那些会 break patch 的文本,如果每次版本更新不会修改的话就可以用 patch
当然最好是向上游库提 issue 沟通交流,甚至可以主动提 pr ,vcpkg/conan 维护者都是这么做的

@Issues-translate-bot
Copy link

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


replace is mainly used for text that break patch. If each version update is not modified, you can use patch
Of course, it is best to communicate with the upstream library, and even actively raise pr. The vcpkg/conan maintainers do this.

@luadebug
Copy link
Contributor Author

replace 主要用于那些会 break patch 的文本,如果每次版本更新不会修改的话就可以用 patch 当然最好是向上游库提 issue 沟通交流,甚至可以主动提 pr ,vcpkg/conan 维护者都是这么做的

acl-dev/acl#339
I think it is already has issue risen, as you see repo owner mentions 好的,我会抽时间完善使用cmake及xmake在各个平台的进行构建的。 .
So there might be very high change for existing buildsystem.

@star-hengxing star-hengxing mentioned this pull request Apr 24, 2025
@heheda123123
Copy link
Contributor

replace 主要用于那些会 break patch 的文本,如果每次版本更新不会修改的话就可以用 patch 当然最好是向上游库提 issue 沟通交流,甚至可以主动提 pr ,vcpkg/conan 维护者都是这么做的

acl-dev/acl#339 I think it is already has issue risen, as you see repo owner mentions 好的,我会抽时间完善使用cmake及xmake在各个平台的进行构建的。 . So there might be very high change for existing buildsystem.

这个库弄着是真费劲

@luadebug luadebug deleted the cl branch April 24, 2025 11:58
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

Successfully merging this pull request may close these issues.

5 participants