You are not logged in.
# Contributor: kusakata <shohei atmark kusakata period com>
# Contributor: Pablo Lezaeta <prflr88 (arro'a) gmail.com>
pkgname=apngopt
pkgver=1.3
pkgrel=1
pkgdesc="Optimizes existing APNG animation"
arch=("i686" "x86_64")
url="http://sourceforge.net/projects/apng/files/APNG_Optimizer/"
license=("zlib")
source=("http://downloads.sourceforge.net/project/apng/APNG_Optimizer/${pkgver}/apngopt-${pkgver}-src.zip")
build() {
cd "${srcdir}"
make DESTDIR="${pkgdir}" prefix=/usr sbindir=/usr/bin bindir=/usr/bin libdir=/usr/lib
}
package() {
cd "${srcdir}"
make DESTDIR="${pkgdir}" prefix=/usr sbindir=/usr/bin bindir=/usr/bin libdir=/usr/lib install
#install -Dm755 apngopt "${pkgdir}/usr/bin/apngopt"
}
md5sums=('e2d2411ea9a704c5522dbcad482816f1')I suspect that something is misused in the source but that supersimplistic makefile is not helping, but I will deal with it later, for now the problem it keep failing during the last part of the build in the 7zip plugin (new to 1.3) "memcpy" "memset" "strcpy" "strrchr" "strcat" those are the culprits but as far ME know those are standard for c++ and also the makefile has -lstdc++ added, that as far ME know has the stadard c++ functions... so I'm a little clueles.
I know who is the culprit but not why.
Last edited by Jristz (2015-03-28 05:15:02)
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline
You've been around long enough, you know we need actual error messages.
Offline
like this?
==> Making package: apngopt 1.3-1 (Sat Mar 28 01:31:10 CLST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found apngopt-1.3-src.zip
==> Validating source files with md5sums...
apngopt-1.3-src.zip ... Passed
==> Extracting sources...
-> Extracting apngopt-1.3-src.zip with bsdtar
bsdtar: Failed to set default locale
==> Starting build()...
mkdir -p obj/. obj/7z obj/zopfli
gcc -o obj/./apngopt.o -c apngopt.cpp -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/7z/OutByte.o -c 7z/OutByte.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/DeflateEncoder.o -c 7z/DeflateEncoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/InByte.o -c 7z/InByte.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/WindowOut.o -c 7z/WindowOut.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LenCoder.o -c 7z/LenCoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LiteralCoder.o -c 7z/LiteralCoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LSBFEncoder.o -c 7z/LSBFEncoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/AriBitCoder.o -c 7z/AriBitCoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/7zlzma.o -c 7z/7zlzma.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LZMADecoder.o -c 7z/LZMADecoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/HuffmanEncoder.o -c 7z/HuffmanEncoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/7zdeflate.o -c 7z/7zdeflate.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/IInOutStreams.o -c 7z/IInOutStreams.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LSBFDecoder.o -c 7z/LSBFDecoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LZMAEncoder.o -c 7z/LZMAEncoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/DeflateDecoder.o -c 7z/DeflateDecoder.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/CRC.o -c 7z/CRC.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/LZMA.o -c 7z/LZMA.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/7z/WindowIn.o -c 7z/WindowIn.cc -I./. -I./7z -I./zopfli -Wall -pedantic -O2 -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
gcc -o obj/zopfli/deflate.o -c zopfli/deflate.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/blocksplitter.o -c zopfli/blocksplitter.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/zopfli_lib.o -c zopfli/zopfli_lib.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/squeeze.o -c zopfli/squeeze.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/lz77.o -c zopfli/lz77.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/gzip_container.o -c zopfli/gzip_container.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/tree.o -c zopfli/tree.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/katajainen.o -c zopfli/katajainen.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/hash.o -c zopfli/hash.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/util.o -c zopfli/util.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/cache.o -c zopfli/cache.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
gcc -o obj/zopfli/zlib_container.o -c zopfli/zlib_container.c -I./. -I./7z -I./zopfli -Wall -pedantic -O2
apngopt.cpp: En la funci?n 'void compose_frame(unsigned char**, unsigned char**, unsigned char, unsigned int, unsigned int, unsigned int, unsigned int)':
apngopt.cpp:98:25: error: 'memcpy' not declared in this scope
memcpy(dp, sp, w*4);
^
apngopt.cpp:103:25: error: 'memcpy' not declared in this scope
memcpy(dp, sp, 4);
^
apngopt.cpp:118:27: error: 'memcpy' not declared in this scope
memcpy(dp, sp, 4);
^
apngopt.cpp: En la funci?n 'unsigned int read_chunk(FILE*, CHUNK*)':
apngopt.cpp:131:29: error: 'memcpy' not declared in this scope
memcpy(pChunk->p, len, 4);
^
apngopt.cpp: En la funci?n 'int load_apng(char*, std::vector<APNGFrame>&, unsigned int&, unsigned int&)':
apngopt.cpp:274:60: error: 'memcpy' not declared in this scope
memcpy(frameNext.p, frameCur.p, imagesize);
^
apngopt.cpp:284:60: error: 'memcpy' not declared in this scope
memcpy(frameNext.p, frameCur.p, imagesize);
^
apngopt.cpp:287:68: error: 'memset' not declared in this scope
memset(frameNext.rows[y0 + j] + x0*4, 0, w0*4);
^
apngopt.cpp:313:54: error: 'memcpy' not declared in this scope
memcpy(chunkIHDR.p + 8, chunk.p + 12, 8);
^
apngopt.cpp:336:42: error: 'memcpy' not declared in this scope
memcpy(chunk.p + 8, "IDAT", 4);
^
apngopt.cpp: En la funci?n 'void optim_duplicates(std::vector<APNGFrame>&, unsigned int)':
apngopt.cpp:414:53: error: 'memcmp' not declared in this scope
if (memcmp(frames[i-1].p, frames[i].p, imagesize) != 0)
^
apngopt.cpp: En la funci?n 'void optim_downconvert(std::vector<APNGFrame>&, unsigned int&)':
apngopt.cpp:474:32: error: 'memset' not declared in this scope
memset(&cube, 0, sizeof(cube));
^
apngopt.cpp: En la funci?n 'void write_chunk(FILE*, const char*, unsigned char*, unsigned int)':
apngopt.cpp:688:29: error: 'memcmp' not declared in this scope
if (memcmp(name, "fdAT", 4) == 0)
^
apngopt.cpp: En la funci?n 'void process_rect(unsigned char*, int, int, int, int, unsigned char*)':
apngopt.cpp:864:38: error: 'memcpy' not declared in this scope
memcpy(dp, best_row, rowbytes+1);
^
apngopt.cpp: En la funci?n 'void deflate_rect_fin(int, int, unsigned char*, unsigned int*, int, int, unsigned char*, int, int)':
apngopt.cpp:884:31: error: 'memcpy' not declared in this scope
memcpy(dp, row, rowbytes);
^
apngopt.cpp:902:30: error: 'memcpy' not declared in this scope
memcpy(zbuf, data, size);
^
apngopt.cpp: En la funci?n 'void get_rect(unsigned int, unsigned int, unsigned char*, unsigned char*, unsigned char*, unsigned int, unsigned int, int, unsigned int, unsigned int, int)':
apngopt.cpp:1061:24: error: 'memcpy' not declared in this scope
memcpy(pc, &c2, 3);
^
apngopt.cpp: En la funci?n 'int save_apng(char*, std::vector<APNGFrame>&, unsigned int, unsigned int, unsigned int, int, int)':
apngopt.cpp:1259:44: error: 'memcpy' not declared in this scope
memcpy(temp, frames[i].p, imagesize);
^
apngopt.cpp:1266:66: error: 'memset' not declared in this scope
memset(temp + ((j+y0)*width + x0)*bpp, tcolor, w0*bpp);
^
apngopt.cpp:1304:44: error: 'memcpy' not declared in this scope
memcpy(rest, frames[i].p, imagesize);
^
apngopt.cpp:1311:66: error: 'memcpy' not declared in this scope
memcpy(rest + ((j+y0)*width + (k+x0))*3, &tcolor, 3);
^
apngopt.cpp:1314:66: error: 'memset' not declared in this scope
memset(rest + ((j+y0)*width + x0)*bpp, tcolor, w0*bpp);
^
apngopt.cpp: En la funci?n 'int main(int, char**)':
apngopt.cpp:1424:28: error: 'strcpy' not declared in this scope
strcpy(szInput, szOpt);
^
apngopt.cpp:1427:26: error: 'strcpy' not declared in this scope
strcpy(szOut, szOpt);
^
apngopt.cpp:1439:26: error: 'strcpy' not declared in this scope
strcpy(szOut, szInput);
^
apngopt.cpp:1440:36: error: 'strrchr' not declared in this scope
if ((szExt = strrchr(szOut, '.')) != NULL) *szExt = 0;
^
apngopt.cpp:1441:29: error: 'strcat' not declared in this scope
strcat(szOut, "_opt.png");
^
Makefile:25: recipe for target 'obj/./apngopt.o' failed
make: *** [obj/./apngopt.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...the makefile of apngopts:
PACKAGE = apngopt
CC = gcc
SRC_DIRS = . 7z zopfli
CFLAGS = -Wall -pedantic
CFLAGS_OPT = -O2
CFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
LIBS = -lstdc++ -lm -lpng -lz
INCUDE_DIRS := $(addprefix -I./, $(SRC_DIRS))
OBJ_DIRS := $(addprefix obj/, $(SRC_DIRS))
OBJECTS := $(addprefix obj/, $(wildcard $(addsuffix /*.c*, $(SRC_DIRS))))
OBJECTS := $(OBJECTS:.c=.o)
OBJECTS := $(OBJECTS:.cc=.o)
OBJECTS := $(OBJECTS:.cpp=.o)
all : $(PACKAGE)
$(PACKAGE) : objdirs $(OBJECTS)
$(CC) -o $@ $(OBJECTS) -s $(LIBS)
objdirs :
mkdir -p $(OBJ_DIRS)
obj/%.o : %.cpp
$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT)
obj/%.o : %.c
$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT)
obj/%.o : %.cc
$(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_7Z)
.PHONY : clean
clean :
rm -rf $(PACKAGE) objMore like backstrace?
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline
A quick search tells me that memcpy is part of string.h (or cstring). This header isn't included in the file that's failing.
Last edited by Scimmia (2015-03-28 04:42:42)
Offline
nope and I can't find it in the other files or headers.
apngopt.cpp need fix, I report this upstream, maybe they take one or two years.
but yea that is the problem, and also for the makefile, I find a patch that add the propper CFLAGs to prevent keep overriden by that makefile.
let rest to me.
Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::
Offline