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

Error: read-modify-write operations are not allowed for shared variables. #362

Closed
tillea opened this issue Aug 29, 2018 · 8 comments
Closed

Comments

@tillea
Copy link

tillea commented Aug 29, 2018

Hi
the build of the Debian package of sambamba (version 0.6.7) fails since some time which is documented in the according bug report. There is the suspicion that the transition of the D compiler has uncovered this error:

[5/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_merge.d.o' -c ../sambamba/merge.d
FAILED: sambamba@exe/sambamba_merge.d.o
ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_merge.d.o' -c ../sambamba/merge.d
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/numeric.d(1845): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"+="(s, e)` instead.
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/numeric.d(1871): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"*="(e, f)` instead.
../sambamba/merge.d(407): Error: template instance `std.numeric.normalize!(shared(float)[])` error instantiating
[6/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_depth.d.o' -c ../sambamba/depth.d

Kind regards, Andreas.

@pjotrp
Copy link
Member

pjotrp commented Aug 30, 2018

I think was fixed in cb170d6

@pjotrp
Copy link
Member

pjotrp commented Aug 30, 2018

New release is coming soon.

@pjotrp pjotrp closed this as completed Aug 30, 2018
@tillea
Copy link
Author

tillea commented Aug 30, 2018 via email

@LocutusOfBorg
Copy link

I tried the patch mentioned, with some changes (because it didn't apply on top of 0.6.7), and it failed.

Using 0.6.8-pre available for download fails too

Build dir: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu
Build type: native build
Project name: Sambamba
Project version: undefined
Appending DFLAGS from environment: '-O -g -release -wi'
Appending LDFLAGS from environment: '-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now'
Native D compiler: ldc2 (llvm 1.11.0 "LDC - the LLVM D compiler (1.11.0):")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency undead found: YES 1.0.7
Native dependency biod found: YES 0.1.0
Native dependency liblz4 found: YES 1.8.2
Native dependency htslib found: YES 1.7-2
Program ldmd2 found: YES (/usr/bin/ldmd2)
Program mkdir found: YES (/bin/mkdir)
Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
   dh_auto_build -O--buildsystem=meson
	cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v
[1/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/main.d.o' -c ../main.d
FAILED: sambamba@exe/main.d.o 
ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/main.d.o' -c ../main.d
../sambamba/view.d(40): Error: module `unpack` is in file 'bio2/unpack.d' which cannot be read
import path[0] = sambamba@exe
import path[1] = .
import path[2] = ..
import path[3] = /usr/include/d
import path[4] = /usr/lib/ldc/x86_64-linux-gnu/include/d/ldc
import path[5] = /usr/lib/ldc/x86_64-linux-gnu/include/d
import path[6] = /usr/include/d
[2/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_fixbins.d.o' -c ../sambamba/fixbins.d
[3/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_flagstat.d.o' -c ../sambamba/flagstat.d
[4/74] ldc2 -Isambamba@exe -I. -I.. -I/usr/include/d -enable-color -O -g -release -wi   -of 'sambamba@exe/sambamba_depth.d.o' -c ../sambamba/depth.d
ninja: build stopped: subcommand failed.
dh_auto_build: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
make: *** [debian/rules:9: build] Error 1
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------

@pjotrp
Copy link
Member

pjotrp commented Sep 14, 2018

can you show the actual error? It is not the same file Andreas had.

btw the current master was successfully built on Linux with ldc 1.11 - see the travis log. https://travis-ci.org/biod/sambamba

@pjotrp
Copy link
Member

pjotrp commented Sep 14, 2018

Ah, OK.

   ../sambamba/view.d(40): Error: module `unpack` is in file 'bio2/unpack.d' which cannot be read

is because files got moved around in the biod submodule.

I can put out a 0.6.8 release soon which fixes all that. When do you need it?

@tillea
Copy link
Author

tillea commented Sep 14, 2018 via email

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

No branches or pull requests

3 participants