Skip to content

(JIGA_LIB) target (CC) call now uses $(CFLAGS) - #26

Open
judovana wants to merge 1 commit into
rh-jmc-team:masterfrom
judovana:missing-cflags
Open

(JIGA_LIB) target (CC) call now uses $(CFLAGS)#26
judovana wants to merge 1 commit into
rh-jmc-team:masterfrom
judovana:missing-cflags

Conversation

@judovana

Copy link
Copy Markdown
Collaborator

Eg --sysroot is usually transfered via them

Eg --sysroot is usually transfered via them
@judovana

judovana commented Sep 13, 2021

Copy link
Copy Markdown
Collaborator Author

Current autotools is unable of crosscompilation. This is first step to allow that (may be wrong). I have no idea what else is missing - the crosscompilation fails "cannot locate -lcriu". The direct compilation with gcc works (see #27) . So I really suspect something missing in current configure. @gnu-andrew can you help please?

@judovana judovana mentioned this pull request Sep 13, 2021
@judovana

Copy link
Copy Markdown
Collaborator Author

It is fixing:

jvanek  jvanek  15:37:00  ~  git  jigawatts-ja  master  ❓  $   ./configure --build x86_64-pc-linux-gnu --host aarch64-linux-gnu  CC=aarch64-linux-gnu-gcc LDFLAGS="-static" CFLAGS="--sysroot=/var/lib/mock/fedora-35-aarch64/root/"
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-linux-gnu-strip... aarch64-linux-gnu-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether aarch64-linux-gnu-gcc accepts -g... yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of aarch64-linux-gnu-gcc... none
checking for a JDK home directory... not specified
checking for /usr/lib/jvm/java-openjdk... found
checking for the JDK version... 11
checking for aarch64-linux-gnu-rmdir... no
checking for rmdir... /usr/bin/rmdir
configure: WARNING: using cross tools not prefixed with host triplet
checking if /usr/bin/rmdir supports --ignore-fail-on-non-empty... yes
checking for aarch64-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for CRIU... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating autotools.pom.properties
config.status: creating MANIFEST.MF
config.status: executing depfiles commands
 jvanek  jvanek  15:37:04  ~  git  jigawatts-ja  master  ❓  $  make
mkdir -p /home/jvanek/git/jigawatts-ja/build
find /home/jvanek/git/jigawatts-ja/src/main/java -name '*.java' | sort > /home/jvanek/git/jigawatts-ja/build/source-files.txt ;
touch /home/jvanek/git/jigawatts-ja/build/source-files.txt
/usr/lib/jvm/java-openjdk/bin/javac -g  \
      -d /home/jvanek/git/jigawatts-ja/build -h /home/jvanek/git/jigawatts-ja/build/include \
      -sourcepath /home/jvanek/git/jigawatts-ja/src/main/java \
      @/home/jvanek/git/jigawatts-ja/build/source-files.txt ;
mkdir -p /home/jvanek/git/jigawatts-ja/stamps
touch /home/jvanek/git/jigawatts-ja/stamps/classes.stamp
cd /home/jvanek/git/jigawatts-ja/build && \
  /usr/bin/mkdir -p META-INF/maven/com.redhat/jigawatts && \
  cp /home/jvanek/git/jigawatts-ja/pom.xml META-INF/maven/com.redhat/jigawatts && \
  cp /home/jvanek/git/jigawatts-ja/autotools.pom.properties META-INF/maven/com.redhat/jigawatts/pom.properties && \
  /usr/lib/jvm/java-openjdk/bin/jar -cvfm jigawatts.jar /home/jvanek/git/jigawatts-ja/MANIFEST.MF ./com META-INF
added manifest
adding: com/(in = 0) (out= 0)(stored 0%)
adding: com/redhat/(in = 0) (out= 0)(stored 0%)
adding: com/redhat/jigawatts/(in = 0) (out= 0)(stored 0%)
adding: com/redhat/jigawatts/Jigawatts.class(in = 5250) (out= 2452)(deflated 53%)
adding: com/redhat/jigawatts/Hook.class(in = 370) (out= 249)(deflated 32%)
adding: com/redhat/jigawatts/LibraryLoader.class(in = 8169) (out= 4031)(deflated 50%)
ignoring entry META-INF/
adding: META-INF/maven/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/com.redhat/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/com.redhat/jigawatts/(in = 0) (out= 0)(stored 0%)
adding: META-INF/maven/com.redhat/jigawatts/pom.properties(in = 61) (out= 62)(deflated -1%)
adding: META-INF/maven/com.redhat/jigawatts/pom.xml(in = 7231) (out= 1987)(deflated 72%)
aarch64-linux-gnu-gcc --sysroot=/var/lib/mock/fedora-35-aarch64/root/ -I/usr/lib/jvm/java-openjdk/include \
  -I/usr/lib/jvm/java-openjdk/include/linux -I/home/jvanek/git/jigawatts-ja/build/include -I/usr/include/criu/  \
  -fPIC -o /home/jvanek/git/jigawatts-ja/build/com_redhat_jigawatts_Jigawatts.o -c /home/jvanek/git/jigawatts-ja/src/main/cpp/com_redhat_jigawatts_Jigawatts.cpp
aarch64-linux-gnu-gcc -static /home/jvanek/git/jigawatts-ja/build/com_redhat_jigawatts_Jigawatts.o -shared -o /home/jvanek/git/jigawatts-ja/build/libJigawatts.so -lcriu 
/usr/bin/aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lcriu
/usr/bin/aarch64-linux-gnu-ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:689: /home/jvanek/git/jigawatts-ja/build/libJigawatts.so] Error 1
 jvanek  jvanek  15:37:09  ~  git  jigawatts-ja  master  2❓  $  

@judovana

Copy link
Copy Markdown
Collaborator Author

(compare with #28)

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.

1 participant