You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/10/13 07:23:10 UTC

[GitHub] [trafficserver] masaori335 opened a new pull request, #9141: Remove deprecated ld option (--add-needed)

masaori335 opened a new pull request, #9141:
URL: https://github.com/apache/trafficserver/pull/9141

   While I'm trying mimalloc (and jemalloc) with llvm toolchain (`lld`), I got the below error.
   
   ```
   ld.lld: error: unknown argument '--add-needed'
   ```
   
   It looks like `lld` doesn't support this option. Also `ld` deprecated this option.
   
   > --add-needed
   --no-add-needed
   These two options have been deprecated because of the similarity of their names to the --as-needed and --no-as-needed options. They have been replaced by --copy-dt-needed-entries and --no-copy-dt-needed-entries.
   
   https://sourceware.org/binutils/docs/ld/Options.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 commented on pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
masaori335 commented on PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#issuecomment-1278305298

   I checked with the devtoolset-9 on centos7 (similar env of #8529), it looks like this change works with `ld`.
   
   ```
   configure:30542: cc -o conftest  -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -I/opt/jemalloc/include   -L/opt/jemalloc/lib -Wl,--as-needed -Wl,-rpath,/opt/jemalloc/lib -Wl,--no-as-needed conftest.c -ljemalloc  -lpthread -ldl  >&5
   configure:30542: $? = 0
   configure:30559: result: -ljemalloc
   configure:30573: checking jemalloc/jemalloc.h usability
   configure:30573: cc -c  -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -I/opt/jemalloc/include conftest.c >&5
   configure:30573: $? = 0
   configure:30573: result: yes
   ...
   LD='/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld -m elf_x86_64'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] zwoop commented on pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
zwoop commented on PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#issuecomment-1298316124

   Cherry-picked to v9.2.x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] duke8253 commented on pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
duke8253 commented on PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#issuecomment-1286180752

   Yeah, at the time there were some weird build errors on our centos test boxes. I'll find some time tomorrow to build it on there with the changes to see if things are working.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] duke8253 commented on a diff in pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
duke8253 commented on code in PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#discussion_r1001138145


##########
build/jemalloc.m4:
##########
@@ -58,7 +58,7 @@ if test "$has_jemalloc" != "no"; then
   if test "$jemalloc_base_dir" != "/usr"; then
     TS_ADDTO(CPPFLAGS, [-I${jemalloc_include}])
     TS_ADDTO(LDFLAGS, [-L${jemalloc_ldflags}])
-    TS_ADDTO(LDFLAGS, [-Wl,--add-needed -L${jemalloc_ldflags} -Wl,-rpath,${jemalloc_ldflags} -Wl,--no-as-needed])

Review Comment:
   I don't think it's a typo because I remember coming back to this and thought it was a typo, but changing it broke stuff. Though I can't remember exactly what was it now, vaguely recall that something about the order of specifying those options made a difference.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 commented on a diff in pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
masaori335 commented on code in PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#discussion_r994256000


##########
build/jemalloc.m4:
##########
@@ -58,7 +58,7 @@ if test "$has_jemalloc" != "no"; then
   if test "$jemalloc_base_dir" != "/usr"; then
     TS_ADDTO(CPPFLAGS, [-I${jemalloc_include}])
     TS_ADDTO(LDFLAGS, [-L${jemalloc_ldflags}])
-    TS_ADDTO(LDFLAGS, [-Wl,--add-needed -L${jemalloc_ldflags} -Wl,-rpath,${jemalloc_ldflags} -Wl,--no-as-needed])

Review Comment:
   @duke8253 is this typo of `--as-needed` option? Because this line has `--no-as-needed` option at the end and it restores the default behavior.
   
   If we really need `--add-needed` option here, `--copy-dt-needed-entries` is the replacement, but `lld` doesn't have it either.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 commented on pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
masaori335 commented on PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#issuecomment-1277591743

   [approve ci fedora]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] randall commented on pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
randall commented on PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141#issuecomment-1277785882

   I'm +1 on this(and had tried to do it myself), but reverted it in #8533


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 merged pull request #9141: Remove deprecated ld option (--add-needed)

Posted by GitBox <gi...@apache.org>.
masaori335 merged PR #9141:
URL: https://github.com/apache/trafficserver/pull/9141


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org