Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Debian 11/gcc 10.2.1 #12

Closed
waldner opened this issue Nov 30, 2021 · 1 comment · Fixed by #13
Closed

Build failure on Debian 11/gcc 10.2.1 #12

waldner opened this issue Nov 30, 2021 · 1 comment · Fixed by #13

Comments

@waldner
Copy link

waldner commented Nov 30, 2021

~/open-vmdk$ make
for x in vmdk ova; do make -C $x all; done
make[1]: Entering directory '/home/waldner/open-vmdk/vmdk'
mkdir -p ../build/vmdk
gcc -W -Wall -O2 -g -c -o ../build/vmdk/flat.o flat.c
gcc -W -Wall -O2 -g -c -o ../build/vmdk/sparse.o sparse.c
sparse.c: In function ‘makeDiskDescriptorFile’:
sparse.c:199:2: warning: ‘strncat’ specified bound 2 equals source length [-Wstringop-overflow=]
  199 |  strncat(ddfTemplate, "\"\n", 2);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sparse.c:196:2: warning: ‘strncpy’ output truncated before terminating nul copying 376 bytes from a string of the same length [-Wstringop-truncation]
  196 |  strncpy(ddfTemplate, ddfConst, ddfConstLen);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sparse.c: In function ‘Sparse_Open’:
sparse.c:752:35: warning: ‘cp.buf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  752 |                     buf == p->buf + p->len) {
      |                            ~~~~~~~^~~~~~~~
sparse.c:938:19: note: ‘cp.buf’ was declared here
  938 |  CoalescedPreader cp;
      |                   ^~
sparse.c:751:13: warning: ‘cp.pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  751 |   if (0 == p->pos + p->len - pos &&
      |            ~^~~~~
sparse.c:938:19: note: ‘cp.pos’ was declared here
  938 |  CoalescedPreader cp;
      |                   ^~
gcc -W -Wall -O2 -g -c -o ../build/vmdk/mkdisk.o mkdisk.c
gcc -o ../build/vmdk/vmdk-convert ../build/vmdk/flat.o ../build/vmdk/sparse.o ../build/vmdk/mkdisk.o -g -lz
/usr/bin/ld: ../build/vmdk/sparse.o:/home/waldner/open-vmdk/vmdk/diskinfo.h:38: multiple definition of `toolsVersion'; ../build/vmdk/flat.o:/home/waldner/open-vmdk/vmdk/diskinfo.h:38: first defined here
/usr/bin/ld: ../build/vmdk/mkdisk.o:/home/waldner/open-vmdk/vmdk/diskinfo.h:38: multiple definition of `toolsVersion'; ../build/vmdk/flat.o:/home/waldner/open-vmdk/vmdk/diskinfo.h:38: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:33: ../build/vmdk/vmdk-convert] Error 1
make[1]: Leaving directory '/home/waldner/open-vmdk/vmdk'
make[1]: Entering directory '/home/waldner/open-vmdk/ova'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/waldner/open-vmdk/ova'
~/open-vmdk$ gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@dongsupark
Copy link
Contributor

I hit the same issue, so created a PR to fix that. #13

jestabro added a commit to jestabro/vyos-build that referenced this issue Mar 1, 2022
jestabro added a commit to jestabro/vyos-build that referenced this issue Apr 2, 2022
The issue vmware/open-vmdk#12 is fixed
upstream and the patch can be dropped from the Dockerfile.
jestabro added a commit to jestabro/vyos-build that referenced this issue Apr 2, 2022
The issue vmware/open-vmdk#12 is fixed
upstream and the patch can be dropped from the Dockerfile.
MartB pushed a commit to MartB/vyos-build that referenced this issue Jan 27, 2023
MartB pushed a commit to MartB/vyos-build that referenced this issue Jan 27, 2023
The issue vmware/open-vmdk#12 is fixed
upstream and the patch can be dropped from the Dockerfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants