Support running JCoz on Fedora
As was mentioned on #30, it would be useful to support running JCoz on other Linux distributions. This issue tracks supporting JCoz on Fedora. What minimum version of Fedora support should be discussed in this thread.
It is straightforward to build the native portion under Centos (so presumably Fedora too), the struggle is around JavaFX. This ticket ought to be resolved as a result of removing JFX and/or tighter integration with coz.
By way of example, this Dockerfile builds the .so on Centos 7.
Sounds good, I'll test Fedora once I've done #39. I may not get a chance to do that tomorrow, but will definitely get to it sometime in the next week.
I'll raise a PR for this once the pending PRs have been merged:
ARG FEDORA_VERSION=30
FROM fedora:${FEDORA_VERSION} as build
RUN yum install -y \
gcc-c++ \
java-1.8.0-openjdk-devel \
make \
maven \
spdlog-devel \
which
COPY . /jcoz
WORKDIR /jcoz
RUN make -j`nproc` all
FROM fedora:${FEDORA_VERSION}
RUN yum install -y java-1.8.0-openjdk-devel
COPY --from=build /jcoz/build*/liblagent.so /jcoz/
COPY --from=build /jcoz/src/java/target/*.jar /jcoz/
COPY --from=build /jcoz/src/java/src/test/java/test /jcoz/test/
WORKDIR /jcoz
CMD ["/bin/bash"]
[root@46ef43c88625 jcoz]# java -cp client-0.0.1-jar-with-dependencies.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.fc30.x86_64/lib/tools.jar jcoz.service.JCozService > service.log &
[1] 48
[root@46ef43c88625 jcoz]# java -cp client-0.0.1.jar:. -agentpath:$(readlink -f liblagent.so) test.TestThreadSerial -s > tts.log &
[2] 67
[root@46ef43c88625 jcoz]# java -cp client-0.0.1.jar:. test.JCozServiceTest | tee jcoz.log
experiment selected=test.TestThreadSerial:81 speedup=0.0 duration=5002437535
progress-point name=end-to-end type=source delta=0
experiment selected=test.TestThreadSerial:81 speedup=0.2 duration=7989262988
progress-point name=end-to-end type=source delta=0
^C