Build of recoverdm with clang_glibc toolchain

The build took 00h 02m 09s and was SUCCESSFUL.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
1,170 ansic
21 makefile
1,191 total

The process tree of the build process is here.

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

Copied permanent toolchain into container-local sysroot
# /toolchain_root/sysroot --> /sysroot/sysroot
# /toolchain_root/lib --> /sysroot/lib
# /toolchain_root/sbin --> /sysroot/sbin
# /toolchain_root/lib64 --> /sysroot/lib64
# /toolchain_root/etc --> /sysroot/etc
# /toolchain_root/share --> /sysroot/share
# /toolchain_root/bin --> /sysroot/bin
# /toolchain_root/var --> /sysroot/var
# /toolchain_root/usr --> /sysroot/usr
# /toolchain_root/glibc-build --> /sysroot/glibc-build
# /toolchain_root/x86_64-pc-linux-gnu --> /sysroot/x86_64-pc-linux-gnu
# /toolchain_root/include --> /sysroot/include
# /toolchain_root/libexec --> /sysroot/libexec

CMD: sudo -u tuscan PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=clang CXX=clang++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: recoverdm 0.20-4 (Thu Apr 13 17:25:45 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o recoverdm.o recoverdm.c
# recoverdm.c:55:25: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *minute = (lba + 150) / (60 * 75);
# ~ ~~~~~~~~~~~~^~~~~~~~~~~
# recoverdm.c:57:25: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *second = (lba + 150) / 75;
# ~ ~~~~~~~~~~~~^~~~
# recoverdm.c:59:17: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *frame = (lba + 150);
# ~ ~~~~^~~~~
# recoverdm.c:63:28: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *minute = (lba + 450150) / (60 * 75);
# ~ ~~~~~~~~~~~~~~~^~~~~~~~~~~
# recoverdm.c:65:28: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *second = (lba + 450150) / 75;
# ~ ~~~~~~~~~~~~~~~^~~~
# recoverdm.c:67:17: warning: implicit conversion loses integer precision: 'long' to 'unsigned char' [-Wconversion]
# *frame = (lba + 450150);
# ~ ~~~~^~~~~~~~
# recoverdm.c:75:50: warning: passing 'const char [7]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# char *sector_out = (char *)mymalloc(block_size, "sector");
# ^~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# recoverdm.c:107:25: warning: implicit conversion loses integer precision: 'int' to 'short' [-Wconversion]
# chosen_byte_count = count[loop2];
# ~ ^~~~~~~~~~~~
# recoverdm.c:108:19: warning: implicit conversion loses integer precision: 'int' to 'short' [-Wconversion]
# chosen_byte = loop2;
# ~ ^~~~~
# recoverdm.c:126:23: warning: implicit conversion loses integer precision: 'short' to 'char' [-Wconversion]
# sector_out[loop] = chosen_byte;
# ~ ^~~~~~~~~~~
# recoverdm.c:149:23: warning: implicit conversion changes signedness: 'unsigned char' to 'char' [-Wsign-conversion]
# sector_out[loop] = sectors[max_n_ok_index][loop];
# ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# recoverdm.c:169:74: warning: passing 'const char [11]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# char **sector_list = (char **)mymalloc(sizeof(char *) * n_raw_retries, "sectorlist");
# ^~~~~~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# recoverdm.c:169:59: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# char **sector_list = (char **)mymalloc(sizeof(char *) * n_raw_retries, "sectorlist");
# ~ ^~~~~~~~~~~~~
# recoverdm.c:174:53: warning: passing 'const char [7]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# sector_list[loop] = (char *)mymalloc(block_size, "sector");
# ^~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# recoverdm.c:184:22: warning: incompatible pointer types passing 'char **' to parameter of type 'unsigned char **' [-Wincompatible-pointer-types]
# if (create_sector(sector_list, n_raw_retries, block_size, &dummy) == -1)
# ^~~~~~~~~~~
# recoverdm.c:71:35: note: passing argument to parameter 'sectors' here
# int create_sector(unsigned char **sectors, int n_sectors, size_t block_size, char **psector_out)
# ^
# recoverdm.c:235:15: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
# dev_type = atoi(optarg);
# ~ ^~~~~~~~~~~~
# recoverdm.c:256:16: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
# n_retries = atoi(optarg);
# ~ ^~~~~~~~~~~~
# recoverdm.c:262:15: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
# cd_speed = atoi(optarg);
# ~ ^~~~~~~~~~~~
# recoverdm.c:265:23: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
# n_raw_cd_retries = atoi(optarg);
# ~ ^~~~~~~~~~~~
# recoverdm.c:307:40: warning: passing 'const char [13]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# buffer = (char *)mymalloc(block_size, "sectorbuffer");
# ^~~~~~~~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# recoverdm.c:308:41: warning: passing 'const char [25]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# buffer2 = (char *)mymalloc(block_size, "sectorbuffer for retries");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# recoverdm.c:361:20: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("%lld\r", curpos);
# ~~~~ ^~~~~~
# %ld
# recoverdm.c:388:50: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("error at %lld bytes, retrying: %d\n", curpos, n);
# ~~~~ ^~~~~~
# %ld
# recoverdm.c:445:38: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# fprintf(dsecfile, "%lld %ld\n", curpos, block_size*skip_value);
# ~~~~ ^~~~~~
# %ld
# recoverdm.c:445:57: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# fprintf(dsecfile, "%lld %ld\n", curpos, block_size*skip_value);
# ~^~~~~~~~~~
# 25 warnings generated.
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o dev.o dev.c
# dev.c:174:2: warning: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Wimplicit-function-declaration]
# memcpy(whereto, &pframe[12 + 4], 2048);
# ^
# dev.c:174:2: note: include the header or explicitly provide a declaration for 'memcpy'
# 1 warning generated.
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o io.o io.c
# io.c:30:17: warning: passing 'const char [41]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("unexpected error while reading: %s (%d)\n", strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# io.c:42:11: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion]
# len -= rc;
# ~~ ^~
# io.c:75:11: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'unsigned long' [-Wsign-conversion]
# len -= rc;
# ~~ ^~
# io.c:132:21: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# move_a_little -= rc;
# ~~ ^~
# io.c:181:13: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# nbytes -= rc;
# ~~ ^~
# io.c:126:14: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
# if ((rc = WRITE(fd, in, move_a_little)) <= 0)
# ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# io.c:163:15: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
# if ((rc = WRITE(fd, in, 512)) <= 0)
# ~ ^~~~~~~~~~~~~~~~~~
# io.c:172:14: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
# if ((rc = WRITE(fd, in, nbytes)) <= 0)
# ~ ^~~~~~~~~~~~~~~~~~~~~
# 8 warnings generated.
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o utils.o utils.c
# utils.c:21:14: warning: passing 'const char [36]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("failed to allocate %d bytes for %s\n", size, what);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# utils.c:30:14: warning: passing 'const char [41]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("failed to reallocate to %d bytes for %s\n", newsize, what);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# utils.c:40:14: warning: passing 'const char [47]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("Failed to retrieve length of file %s: %s (%d)\n", filename, strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# utils.c:51:28: warning: operand of ? changes signedness: 'off64_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
# size_t sector_size = min(block_size, 512);
# ~~~~~~~~~~~ ^~~~~~~~~~
# ./gen.h:1:35: note: expanded from macro 'min'
# #define min(x, y) ((x)<(y)?(x):(y))
# ^
# utils.c:56:73: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
# fprintf(stderr, "Failed to read %d bytes from inputfile: %s (%d)\n", sector_size, strerror(errno), errno);
# ~~ ^~~~~~~~~~~
# %zu
# utils.c:78:14: warning: passing 'const char [48]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("Failed to seek in file to offset %lld: %s (%d)\n", offset, strerror(errno), errno);
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# 6 warnings generated.
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o error.o error.c
# clang -Wall -W recoverdm.o dev.o io.o utils.o error.o -o recoverdm
# clang -Wall -Wshadow -Wconversion -Wwrite-strings -Winline -O2 -DVERSION=\"0.20\" -c -o mergebad.o mergebad.c
# mergebad.c:45:71: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("> find_image_without_badblock(%p %d %lld)\n", imgs, n_imgs, offset);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:59:65: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:59:77: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:103:80: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("> find_smallest_current_badblock(%p %d %lld %p %p)\n", imgs, n_imgs, offset, selected_image, selected_badblock);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:118:65: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:118:77: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("= %d/%d, %lld - %lld\n", img_index, badblock_index, cur_offset, cur_bb_end);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:130:39: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("= # bytes left: %lld\n", block_size_left);
# ~~~~ ^~~~~~~~~~~~~~~
# %ld
# mergebad.c:148:99: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("> find_smallest_current_badblock: %d %d (%lld)\n", *selected_image, *selected_badblock, smallest_block_size);
# ~~~~ ^~~~~~~~~~~~~~~~~~~
# %ld
# mergebad.c:189:25: warning: format specifies type 'long long *' but the argument has type 'off64_t *' (aka 'long *') [-Wformat]
# fscanf(fh, "%lld %d", &offset, &block_size);
# ~~~~ ^~~~~~~
# %ld
# mergebad.c:191:67: warning: passing 'const char [15]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# bbs = (badblock *)myrealloc(bbs, sizeof(badblock) * (n_bb + 1), "badblocks list");
# ^~~~~~~~~~~~~~~~
# ./utils.h:2:52: note: passing argument to parameter 'what' here
# void * myrealloc(void *oldp, size_t newsize, char *what);
# ^
# mergebad.c:191:61: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# bbs = (badblock *)myrealloc(bbs, sizeof(badblock) * (n_bb + 1), "badblocks list");
# ~ ~~~~~^~~
# mergebad.c:196:36: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("%d] %lld %lld\n", n_bb, offset, block_size);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:196:44: warning: format specifies type 'long long' but the argument has type 'int' [-Wformat]
# printf("%d] %lld %lld\n", n_bb, offset, block_size);
# ~~~~ ^~~~~~~~~~
# %d
# mergebad.c:228:20: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
# selected_byte = loop;
# ~ ^~~~
# mergebad.c:235:14: warning: passing 'const char [31]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("Internal error: no byte found!");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# mergebad.c:269:57: warning: passing 'const char [16]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# imgs = myrealloc(imgs, sizeof(image) * (n_imgs + 1), "image structure");
# ^~~~~~~~~~~~~~~~~
# ./utils.h:2:52: note: passing argument to parameter 'what' here
# void * myrealloc(void *oldp, size_t newsize, char *what);
# ^
# mergebad.c:269:51: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
# imgs = myrealloc(imgs, sizeof(image) * (n_imgs + 1), "image structure");
# ~ ~~~~~~~^~~
# mergebad.c:290:86: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("Adding image: %s/%lld number of badblocks: %d\n", imgs[n_imgs].filename, imgs[n_imgs].size, imgs[n_imgs].bb_list_size);
# ~~~~ ^~~~~~~~~~~~~~~~~
# %ld
# mergebad.c:318:35: warning: format specifies type 'int' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("Length set to: %d\n", length);
# ~~ ^~~~~~
# %ld
# mergebad.c:357:84: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("No filelength given, using length of file %s: %lld\n", imgs[0].filename, (length = get_filesize(imgs[0].filename)));
# ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# %ld
# mergebad.c:365:37: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("Current offset: %lld\n", offset);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:388:51: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("Will copy %lld bytes from file %s\n", n_bytes_to_copy, imgs[img_index].filename);
# ~~~~ ^~~~~~~~~~~~~~~
# %ld
# mergebad.c:396:113: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# fprintf(stderr, "There was a problem copying %lld bytes of data from file %s to the outputfile: %s (%d)\n", n_bytes_to_copy, imgs[img_index].filename, strerror(errno), errno);
# ~~~~ ^~~~~~~~~~~~~~~
# %ld
# mergebad.c:411:109: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("No image without badblocks for current offset (%lld) found: \"guessing\" one or more bytes.\n", offset);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:413:52: warning: passing 'const char [53]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# guess_bytes = (unsigned char *)mymalloc(n_imgs, "temp buffer for bytes from each image to select from");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# mergebad.c:413:44: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
# guess_bytes = (unsigned char *)mymalloc(n_imgs, "temp buffer for bytes from each image to select from");
# ~~~~~~~~ ^~~~~~
# mergebad.c:419:16: warning: passing 'const char [57]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("Internal error: could not find the badblock \"we're in\".\n");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# mergebad.c:431:41: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# fprintf(fh_map_file, "%lld %lld\n", offset, n_to_guess);
# ~~~~ ^~~~~~
# %ld
# mergebad.c:431:49: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# fprintf(fh_map_file, "%lld %lld\n", offset, n_to_guess);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:437:41: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
# printf("\"Guessing\" %lld bytes\n", n_to_guess);
# ~~~~ ^~~~~~~~~~
# %ld
# mergebad.c:441:16: warning: passing 'const char [41]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# error_exit("Number of \"bytes to guess\" less then 1!\n");
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ./error.h:1:23: note: passing argument to parameter 'format' here
# void error_exit(char *format, ...);
# ^
# mergebad.c:449:41: warning: passing 'const char [14]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
# output_buffer = mymalloc(n_to_guess, "guessed bytes");
# ^~~~~~~~~~~~~~~
# ./utils.h:1:36: note: passing argument to parameter 'what' here
# void * mymalloc(size_t size, char *what);
# ^
# mergebad.c:449:29: warning: implicit conversion changes signedness: 'off64_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
# output_buffer = mymalloc(n_to_guess, "guessed bytes");
# ~~~~~~~~ ^~~~~~~~~~
# mergebad.c:472:45: warning: implicit conversion changes signedness: 'off64_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
# if (phantom_write(fd_out, output_buffer, n_to_guess) != n_to_guess)
# ~~~~~~~~~~~~~ ^~~~~~~~~~
# 34 warnings generated.
# clang -Wall -W mergebad.o io.o utils.o error.o -o mergebad
# ==> Entering fakeroot environment...
# ==> Starting package()...
# ==> Tidying install...
# -> Removing doc files...
# -> Purging unwanted files...
# ==> Checking for packaging issue...
# ==> Creating package "recoverdm"...
# -> Generating .PKGINFO file...
# -> Generating .BUILDINFO file...
# error: invalid option '--noprogressbar'
# -> Generating .MTREE file...
# -> Compressing package...
# ==> Leaving fakeroot environment.
# ==> Finished making: recoverdm 0.20-4 (Thu Apr 13 17:25:53 UTC 2017)

CMD: pacman --query --file recoverdm-0.20-4-x86_64.pkg.tar.xz
# recoverdm 0.20-4

Creating hybrid package for 'recoverdm'

Trying to find vanilla package 'recoverdm'...

CMD: pacman --query --file /mirror/recoverdm-0.20-4.pkg.tar.xz
# recoverdm 0.20-4

Package file has the following structure:
# /.PKGINFO
# /.MTREE
# /usr/bin/mergebad
# /usr/bin/recoverdm

Generating .MTREE

CMD: bsdtar -czf .MTREE --format=mtree --options=!all,use-set,type,uid,mode,time,size,md5,sha256,link .PKGINFO usr

Tar-ing up files

CMD: bsdtar -cf - .PKGINFO usr .MTREE

CMD: xz -c -z

Successfully ran bsdtar -cf - .PKGINFO usr .MTREE | xz -c -z

CMD: bsdtar -tqf recoverdm.pkg.tar.xz .PKGINFO
# .PKGINFO

Created package at path /var/cache/pacman/pkg/recoverdm.pkg.tar.xz

Attempting to access local repository, attempt 1

CMD: repo-add /var/cache/pacman/pkg/tuscan.db.tar /var/cache/pacman/pkg/recoverdm.pkg.tar.xz
# ==> ERROR: Failed to acquire lockfile: /var/cache/pacman/pkg/tuscan.db.tar.lck.
# ==> ERROR: Held by process 6105

Attempting to access local repository, attempt 2

CMD: repo-add /var/cache/pacman/pkg/tuscan.db.tar /var/cache/pacman/pkg/recoverdm.pkg.tar.xz
# ==> ERROR: Failed to acquire lockfile: /var/cache/pacman/pkg/tuscan.db.tar.lck.
# ==> ERROR: Held by process 2058

Attempting to access local repository, attempt 3

CMD: repo-add /var/cache/pacman/pkg/tuscan.db.tar /var/cache/pacman/pkg/recoverdm.pkg.tar.xz
# ==> ERROR: Failed to acquire lockfile: /var/cache/pacman/pkg/tuscan.db.tar.lck.
# ==> ERROR: Held by process 471

Attempting to access local repository, attempt 4

CMD: repo-add /var/cache/pacman/pkg/tuscan.db.tar /var/cache/pacman/pkg/recoverdm.pkg.tar.xz
# ==> Extracting database to a temporary location...
# ==> Extracting database to a temporary location...
# ==> Adding package '/var/cache/pacman/pkg/recoverdm.pkg.tar.xz'
# -> Computing checksums...
# -> Creating 'desc' db entry...
# -> Creating 'files' db entry...
# ==> Creating updated database file '/var/cache/pacman/pkg/tuscan.db.tar'