-
Notifications
You must be signed in to change notification settings - Fork 848
Update common.m4 to correctly use $LIBS instead of $LDFLAGS #4793
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With Ubuntu, the wl,asneeded flags i injected automatically. This causes the link fail, because of LDFLAGS being put before common.c when autoconf runs. $CC $CPPFLAGS $CFLAGS $LDFLAGS sourcefile.c $LIBS ^^ gcc strips the library because it is put before the file being compiled and then fails. failure: configure:26271: $? = 1 configure:26590: checking for LUAJIT configure:26597: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4" configure:26600: $? = 0 configure:26614: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4" configure:26617: $? = 0 configure:27005: result: yes configure:27061: checking jansson.h usability configure:27061: cc -c -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c >&5 configure:27061: $? = 0 configure:27061: result: yes configure:27061: checking jansson.h presence configure:27061: cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c configure:27061: $? = 0 configure:27061: result: yes configure:27061: checking for jansson.h configure:27061: result: yes configure:27067: checking whether jansson is dynamic configure:27082: cc -o conftest -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC -ljansson conftest.c -lbrotlienc -lpthread -ldl >&5 /usr/bin/ld: /tmp/cc2Ctsj4.o: in function `main': ./conftest.c:96: undefined reference to `json_object' collect2: error: ld returned 1 exit status configure:27082: $? = 1 with this patch: configure:26271: $? = 1 configure:26590: checking for LUAJIT configure:26597: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4" configure:26600: $? = 0 configure:26614: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4" configure:26617: $? = 0 configure:27005: result: yes configure:27061: checking jansson.h usability configure:27061: cc -c -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c >&5 configure:27061: $? = 0 configure:27061: result: yes configure:27061: checking jansson.h presence configure:27061: cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c configure:27061: $? = 0 configure:27061: result: yes configure:27061: checking for jansson.h configure:27061: result: yes configure:27067: checking whether jansson is dynamic configure:27082: cc -o conftest -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now conftest.c -lbrotlienc -lpthread -ldl -fPIC -ljansson >&5 configure:27082: $? = 0 configure:27083: result: yes
Contributor
|
[approve ci] |
SolidWallOfCode
approved these changes
Jan 14, 2019
randall
approved these changes
Jan 14, 2019
bryancall
approved these changes
Jan 16, 2019
Contributor
|
Cherry picked to 8.1.0 |
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Jul 9, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Jul 11, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Aug 5, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Aug 17, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Aug 27, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Oct 31, 2019
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Feb 18, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Mar 8, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Apr 24, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Jul 2, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Aug 12, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Oct 17, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Nov 30, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Dec 12, 2020
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Aug 20, 2021
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
raspbian-autopush
pushed a commit
to raspbian-packages/trafficserver
that referenced
this pull request
Jun 9, 2022
Forwarded: apache/trafficserver#4793 Last-Update: 2019-01-12 Gbp-Pq: Name 0015-as-needed-fix.patch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With Ubuntu, the wl,asneeded flags i injected automatically.
This causes the link fail, because of LDFLAGS being put before common.c when autoconf runs.
$CC $CPPFLAGS $CFLAGS $LDFLAGS sourcefile.c $LIBS
^^ gcc strips the library because it is put before the file being compiled and then fails.
failure:
configure:26271: $? = 1
configure:26590: checking for LUAJIT
configure:26597: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4"
configure:26600: $? = 0
configure:26614: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4"
configure:26617: $? = 0
configure:27005: result: yes
configure:27061: checking jansson.h usability
configure:27061: cc -c -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c >&5
configure:27061: $? = 0
configure:27061: result: yes
configure:27061: checking jansson.h presence
configure:27061: cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c
configure:27061: $? = 0
configure:27061: result: yes
configure:27061: checking for jansson.h
configure:27061: result: yes
configure:27067: checking whether jansson is dynamic
configure:27082: cc -o conftest -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC -ljansson conftest.c -lbrotlienc -lpthread -ldl >&5
/usr/bin/ld: /tmp/cc2Ctsj4.o: in function
main': ./conftest.c:96: undefined reference tojson_object'collect2: error: ld returned 1 exit status
configure:27082: $? = 1
with this patch:
configure:26271: $? = 1
configure:26590: checking for LUAJIT
configure:26597: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4"
configure:26600: $? = 0
configure:26614: $PKG_CONFIG --exists --print-errors "luajit >= 2.0.4"
configure:26617: $? = 0
configure:27005: result: yes
configure:27061: checking jansson.h usability
configure:27061: cc -c -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c >&5
configure:27061: $? = 0
configure:27061: result: yes
configure:27061: checking jansson.h presence
configure:27061: cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN conftest.c
configure:27061: $? = 0
configure:27061: result: yes
configure:27061: checking for jansson.h
configure:27061: result: yes
configure:27067: checking whether jansson is dynamic
configure:27082: cc -o conftest -g -O2 -fdebug-prefix-map=/trafficserver-8.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now conftest.c -lbrotlienc -lpthread -ldl -fPIC -ljansson >&5
configure:27082: $? = 0
configure:27083: result: yes