Open 0-wiz-0 opened 6 years ago
Does this also create empty xml file
echo asd > test.txt
lgogdownloader --create-xml test.txt
yes:
# echo asd > test.txt
# lgogdownloader --create-xml test.txt
test.txt
Filesize: 4 bytes
Chunks: 1
Chunk size: 10 MB
Getting MD5 for chunks
Chunks hashed 1 / 1
MD5: e07910a06a086c83ba41827aa00b26ed
Writing XML: /home/wiz/.cache/lgogdownloader/xml/test.txt.xml
# cat /home/wiz/.cache/lgogdownloader/xml/test.txt.xml
#
So writing the XML data to file fails for some reason.
Apply this patch: https://sites.google.com/site/gogdownloader/createxml_test.diff and then post the output of
echo asd > test.txt
lgogdownloader --create-xml test.txt
In my build environment:
# ./lgogdownloader --create-xml test.txt
test.txt
Filesize: 4 bytes
Chunks: 1
Chunk size: 10 MB
Getting MD5 for chunks
Chunks hashed 1 / 1
MD5: e07910a06a086c83ba41827aa00b26ed
#
In a manual build outside this works. I'm confused.
# ./lgogdownloader --create-xml test.txt
test.txt
Filesize: 4 bytes
Chunks: 1
Chunk size: 10 MB
Getting MD5 for chunks
Chunks hashed 1 / 1
MD5: e07910a06a086c83ba41827aa00b26ed
<file name="test.txt" chunks="1" total_size="4" md5="e07910a06a086c83ba41827aa00b26ed">
<chunk id="0" from="0" to="3" method="md5">e07910a06a086c83ba41827aa00b26ed</chunk>
</file>
The cmake build output looks nearly the same, except for:
@@ -35,76 +37,70 @@
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
--- Looking for pthread_create - found
+-- Looking for pthread_create - not found
+-- Looking for pthread_create in pthreads
+-- Looking for pthread_create in pthreads - not found
+-- Looking for pthread_create in pthread
+-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Git: /usr/pkg/bin/git (found version "2.15.1")
+WARNING: One of the following is missing: help2man, gzip; man page will not be generated
-- Configuring done
-- Generating done
which doesn't look related.
This is weird. Do the environments have different versions of libtinyxml2? Has XML creation worked previously or has this been an issue always?
I found the difference: When I compile lgogdownloader with:
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS:STRING="-fstack-check" ..
make
then the XML files end up empty. That's with gcc 5.5.0 on NetBSD/amd64.
I use lgogdownloader with the following command line:
I often see it happening that an existing extra is downloaded again, like here:
When I immediately try again, the same thing happens. Looking at the cache file,
xml/jazz_jackrabbit_collection/jazz_jackrabbit_manual.zip.xml
I see that it is an empty file (0 bytes long). So it seems there is a problem with creating XML files for extras, at least for me. (Perfectly repeatable right now with lgogdownloader from git, version3.3M.90dcaf0
.)