Package: imms
Version: 3.1.0~svn301-3.2
Severity: important
Tags: sid + patch
Justification: FTBFS
User: [email protected]
Usertags: mips-patch
Package imms FTBFS for mips64el with an error:
> g++ immsd.o socketserver.o libimmscore.a libmodel.a `pkg-config glib-2.0
> --libs` -L. -lXss -lXext -lX11 -lsqlite3 -lz -lpcre -ltorch -ltag
> -L/usr/X11R6/lib -Wl,-z,relro -L/usr/X11R6/> lib -o immsd>
> /usr/bin/ld: libmodel.a(svm-similarity-data.o): warning: linking abicalls
> files with non-abicalls files>
> /usr/bin/ld: libmodel.a(svm-similarity-data.o): linking 32-bit code with
> 64-bit code
svm-similarity-data.o is created using objcopy and do not contain flags
information:
> $ readelf -h build/svm-similarity-data.o | grep Flags
> Flags: 0x0
Similar issue is recently noticed for kvmtool:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827525
Here is also possible to create svm-similarity-data.o using xdd and g++.
Needed changes are included in use-xdd-for-svm_similarity.patch.
Using this patch I was able to build imms for mips64el.
The patch is tested on mipsel, i386, amd64.
Regards,
Dejan
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
imms (3.1.0~svn301-3.2) unstable; urgency=medium
.
* Non-maintainer upload.
* debian/control: Tighten audacious-dev in Build-Depends to (>= 3.6).
* debian/patches/audacious-3.6.patch: Upstream patch to port imms to
Audacious 3.6+ (Closes: #807843)
Author: Sebastian Ramacher <[email protected]>
Bug-Debian: http://bugs.debian.org/807843
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- imms-3.1.0~svn301.orig/model/model.cc
+++ imms-3.1.0~svn301/model/model.cc
@@ -57,8 +57,8 @@ static const int num_hidden = 25;
static const int num_outputs = 2;
static const int stdv = 12;
-extern char _binary____data_svm_similarity_start;
-extern char _binary____data_svm_similarity_end;
+extern char ___data_svm_similarity;
+extern char ___data_svm_similarity_len;
class XFileModeSetter {
public:
@@ -104,10 +105,7 @@ public:
}
else
{
- static const size_t data_size = &_binary____data_svm_similarity_end
- - &_binary____data_svm_similarity_start;
- model.reset(new MemoryXFile(
- &_binary____data_svm_similarity_start, data_size));
+ model.reset(new MemoryXFile(&___data_svm_similarity, ___data_svm_similarity_len));
}
normalizer.load(model.get());
svm.loadXFile(model.get());
--- imms-3.1.0~svn301.orig/rules.mk
+++ imms-3.1.0~svn301/rules.mk
@@ -37,7 +37,7 @@ link = $(CXX) $(filter-out %.a,$1) $(fil
-shared -Wl,-z,defs,-soname,$@ -o $@
%-data.o: %
- $(OBJCOPY) -I binary -O $(OBJCOPYTARGET) -B $(OBJCOPYARCH) --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
+ xxd -i $< | $(CXX) -c -x c - -o $@
# macros that expand to the object files in the given directories
objects=$(sort $(notdir $(foreach type,c cc,$(call objects_$(type),$1))))