Bug#1019528: service-wrapper-java: FTBFS on riscv64 (Missing makefile)

Eric Long i at hack3r.moe
Sun Sep 11 09:53:18 BST 2022


Source: service-wrapper-java
Version: 3.5.50-2
Severity: important
Tags: ftbfs patch
Justification: fails to build from source (but built successfully in the past)
User: debian-riscv at lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: i at hack3r.moe

Dear maintainer(s),

We are currently porting packages to riscv64 platforms. service-wrapper-java
failed to build on riscv64 due to missing makefile:

```
init:
   [tstamp] Honouring environment variable SOURCE_DATE_EPOCH which has been set to 1654839163

init:msg:
     [echo] **********************************************************************
     [echo] * About to build a 64-bit version of Java Service Wrapper Community 3.5.50.
     [echo] * The OS Name is "linux", resolved from "Linux".
     [echo] * The Architecture is "riscv64", resolved from "riscv64".
     [echo] * The distribution name will be: wrapper-linux-riscv64-64-3.5.50
     [echo] **********************************************************************

update-info-c:
     [copy] Copying 1 file to /<<PKGBUILDDIR>>/src/c

compile-c-unix-check:
     [echo] **********************************************************************
     [echo] * Unable to locate a makefile for the current platform.  Looking for:
     [echo] *   Makefile-linux-riscv64-64.make
     [echo] * If the name contains any spaces or upper case characters then the
     [echo] * os and architecture need to be defined in the build.xml file as well.
     [echo] **********************************************************************

BUILD FAILED
/<<PKGBUILDDIR>>/build.xml:759: Missing makefile.

Total time: 20 seconds
make[1]: *** [debian/rules:33: override_dh_auto_build] Error 1
```

Full buildd log: https://buildd.debian.org/status/fetch.php?pkg=service-wrapper-java&arch=riscv64&ver=3.5.50-2&stamp=1654842077&raw=0

Attached is a patch that adds makefile for riscv64. Please let me know if I
missed anything.

Cheers,
Eric
-------------- next part --------------
Description: Add riscv64 support
 cp Makefile-linux-arm-64.make Makefile-linux-riscv64-64.make
Author: Eric Long <i at hack3r.moe>
Last-Update: 2022-09-11
--- /dev/null
+++ b/src/c/Makefile-linux-riscv64-64.make
@@ -0,0 +1,50 @@
+# Copyright (c) 1999, 2022 Tanuki Software, Ltd.
+# http://www.tanukisoftware.com
+# All rights reserved.
+#
+# This software is the proprietary information of Tanuki Software.
+# You shall use it only in accordance with the terms of the
+# license agreement you entered into with Tanuki Software.
+# http://wrapper.tanukisoftware.com/doc/english/licenseOverview.html
+
+COMPILE = gcc -g -O3 -fPIC -Wall --pedantic -DLINUX -D_FORTIFY_SOURCE=2 -DJSW64 -D_FILE_OFFSET_BITS=64 -fpic -D_GNU_SOURCE -DUNICODE -D_UNICODE
+
+WRAPPER_LINK_OPTS = -Wl,-z,relro,-z,now
+
+INCLUDE=$(JAVA_HOME)/include
+
+DEFS = -I$(INCLUDE) -I$(INCLUDE)/linux
+
+wrapper_SOURCE = wrapper.c wrapperinfo.c wrappereventloop.c wrapper_unix.c property.c logger.c logger_file.c wrapper_file.c wrapper_i18n.c wrapper_hashmap.c wrapper_ulimit.c wrapper_encoding.c wrapper_jvminfo.c
+
+libwrapper_so_OBJECTS = wrapper_i18n.o wrapperjni_unix.o wrapperinfo.o wrapperjni.o loggerjni.o
+
+BIN = ../../bin
+LIB = ../../lib
+
+all: init wrapper libwrapper.so
+
+clean:
+	rm -f *.o
+
+cleanall: clean
+	rm -rf *~ .deps
+	rm -f $(BIN)/wrapper $(LIB)/libwrapper.so
+
+init:
+	if test ! -d .deps; then mkdir .deps; fi
+
+wrapper: $(wrapper_SOURCE)
+	$(COMPILE) $(WRAPPER_LINK_OPTS) -pthread $(wrapper_SOURCE) -lm -o $(BIN)/wrapper
+
+libwrapper.so: $(libwrapper_so_OBJECTS)
+	${COMPILE} -shared $(libwrapper_so_OBJECTS) -o $(LIB)/libwrapper.so
+
+%.o: %.c
+	@echo '$(COMPILE) -c $<'; \
+	$(COMPILE) -pthread $(DEFS) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-cp .deps/$(*F).pp .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	>> .deps/$(*F).P; \
+	rm .deps/$(*F).pp


More information about the pkg-java-maintainers mailing list