Skip to content

Conversation

@duke8253
Copy link
Contributor

Add optional static argument for --enable-asan, --enable-tsan, and --enable-lsan (e.g../configure --enable-asan=static will statically link ASAN).

@duke8253 duke8253 added the Build work related to build configuration or environment label Aug 27, 2019
@duke8253 duke8253 added this to the 9.1.0 milestone Aug 27, 2019
@duke8253 duke8253 requested review from bryancall and shinrich August 27, 2019 16:24
@duke8253 duke8253 self-assigned this Aug 27, 2019
@bryancall
Copy link
Contributor

It doesn't check to see if the static libraries are installed:

make[1]: Entering directory '/home/bcall/dev/apache/trafficserver/src/tscore'
/bin/sh ../../libtool  --tag=CC   --mode=link ccache cc -std=gnu99 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -fsanitize=thread -static-libtsan -mcx16  -rdynamic -Wl,--as-needed  -o mkdfa mkdfa.o  -lpthread -ldl
libtool: link: ccache cc -std=gnu99 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -fsanitize=thread -static-libtsan -mcx16 -rdynamic -Wl,--as-needed -o mkdfa mkdfa.o  -lpthread -ldl
/bin/ld: cannot find -ltsan

@bryancall
Copy link
Contributor

bryancall commented Aug 27, 2019

Are you testing this? I am still seeing an issue with asan and tsan not finding the static library:

11:31:17 bart:(master)~/dev/apache/trafficserver$ ./configure --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-werror --enable-asan=static && make clean && make V=1
...
ccache cc -DHAVE_CONFIG_H -I. -I../../include  -Dlinux -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_REENTRANT -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -I/home/bcall/dev/apache/trafficserver/iocore/eventsystem -I/home/bcall/dev/apache/trafficserver/iocore/net -I/home/bcall/dev/apache/trafficserver/iocore/net/quic -I/home/bcall/dev/apache/trafficserver/iocore/aio -I/home/bcall/dev/apache/trafficserver/iocore/hostdb -I/home/bcall/dev/apache/trafficserver/iocore/cache -I/home/bcall/dev/apache/trafficserver/iocore/utils -I/home/bcall/dev/apache/trafficserver/iocore/dns -I/home/bcall/dev/apache/trafficserver/include -I/home/bcall/dev/apache/trafficserver/lib  -I/home/bcall/dev/apache/trafficserver/lib/yamlcpp/include -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN -std=gnu99 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -fno-omit-frame-pointer -fsanitize=address -static-libasan -mcx16  -MT mkdfa.o -MD -MP -MF $depbase.Tpo -c -o mkdfa.o mkdfa.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../../libtool  --tag=CC   --mode=link ccache cc -std=gnu99 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -fno-omit-frame-pointer -fsanitize=address -static-libasan -mcx16  -rdynamic -Wl,--as-needed  -o mkdfa mkdfa.o  -lpthread -ldl
libtool: link: ccache cc -std=gnu99 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Werror -fno-omit-frame-pointer -fsanitize=address -static-libasan -mcx16 -rdynamic -Wl,--as-needed -o mkdfa mkdfa.o  -lpthread -ldl
/bin/ld: cannot find -lasan

@zwoop
Copy link
Contributor

zwoop commented Aug 27, 2019

Also, as mentioned in emails, all PRs are now v10.0.0

@zwoop zwoop modified the milestones: 9.1.0, 10.0.0 Aug 27, 2019
@shukitchan
Copy link
Contributor

Can we update documentation as well for these options?

Copy link
Contributor

@bryancall bryancall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran a few different tests over the PR and it pass all of them.

@bryancall
Copy link
Contributor

[approve ci autest]

1 similar comment
@maskit
Copy link
Member

maskit commented Aug 28, 2019

[approve ci autest]

@duke8253
Copy link
Contributor Author

Not sure why autest fails to compile, didn't even touch the file it's reporting.

@duke8253
Copy link
Contributor Author

[approve ci autest]

@maskit
Copy link
Member

maskit commented Aug 28, 2019

Ah, it's #5887.

@duke8253
Copy link
Contributor Author

Ah, it's #5887.

Just saw it.

@bryancall
Copy link
Contributor

[approve ci autest]

@duke8253 duke8253 merged commit 211d6c9 into apache:master Aug 28, 2019
@zwoop
Copy link
Contributor

zwoop commented Aug 30, 2019

Cherry-picked to v9.0.x branch.

@zwoop zwoop modified the milestones: 10.0.0, 9.0.0 Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build work related to build configuration or environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants