Code Monkey home page Code Monkey logo

Comments (4)

zitterbewegung avatar zitterbewegung commented on May 22, 2024

Are you able to run oss-build-and-test.sh ? If you are what is the output of that?

from cinder.

kmod avatar kmod commented on May 22, 2024

Same issue:

$ ./oss-build-and-test.sh
[snip]
g++ -pthread   -lrt   -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.8_static.a -lcrypt -pthread -ldl  -lutil -lm   -lm 
/usr/bin/ld: libpython3.8_static.a(virtmem.o): in function `asmjit::VirtMem_openAnonymousMemory(int*, bool) [clone .part.0]': /home/kmod/cinder/ThirdParty/asmjit/src/asmjit/core/virtmem.cpp:330: undefined reference to `shm_open'
/usr/bin/ld: /home/kmod/cinder/ThirdParty/asmjit/src/asmjit/core/virtmem.cpp:332: undefined reference to `shm_unlink'
collect2: error: ld returned 1 exit status
make: *** [Makefile:895: Programs/_testembed] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: libpython3.8_static.a(virtmem.o): in function `asmjit::VirtMem_openAnonymousMemory(int*, bool) [clone .part.0]':
/home/kmod/cinder/ThirdParty/asmjit/src/asmjit/core/virtmem.cpp:330: undefined reference to `shm_open'
/usr/bin/ld: /home/kmod/cinder/ThirdParty/asmjit/src/asmjit/core/virtmem.cpp:332: undefined reference to `shm_unlink'
collect2: error: ld returned 1 exit status
make: *** [Makefile:765: python] Error 1

from cinder.

gosella avatar gosella commented on May 22, 2024

Maybe I can help with this issue. I've got a similar problem and I think I fixed by doing some changes to the Makefile.pre.in:

diff --git a/Makefile.pre.in b/Makefile.pre.in
index b2d5908..7158b2a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -119,13 +119,7 @@ PY_CXXFLAGS_NODIST=$(CONFIGURE_CXXFLAGS_NODIST) $(CXXFLAGS_NODIST) -I$(srcdir)/I
 # environment variables
 PY_CPPFLAGS=	$(BASECPPFLAGS) -I. -I$(srcdir)/Include -I$(srcdir)/ThirdParty/fmt-6.1.1/include -I$(srcdir)/ThirdParty/i386-dis $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) -DFMT_HEADER_ONLY=1
 PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)
-OS_NAME := $(shell uname -s)
-ifeq ($(OS_NAME), Darwin)
-	LRT_FLAG=
-else
-	LRT_FLAG=-lrt
-endif
-PY_LDFLAGS=	$(CONFIGURE_LDFLAGS) $(LDFLAGS) $(LRT_FLAG)
+PY_LDFLAGS=	$(CONFIGURE_LDFLAGS) $(LDFLAGS)
 
 NO_AS_NEEDED=	@NO_AS_NEEDED@
 SGI_ABI=	@SGI_ABI@
@@ -256,6 +250,10 @@ INSTSONAME=	@INSTSONAME@
 
 
 LIBS=		@LIBS@
+OS_NAME := $(shell uname -s)
+ifneq ($(OS_NAME), Darwin)
+	LIBS += -lrt
+endif
 LIBM=		@LIBM@
 LIBC=		@LIBC@
 SYSLIBS=	$(LIBM) $(LIBC)

After applying the changes, I did a make distclean && ./configure && make -j.

The problem is that the -lrt is been added at the start of the g++ command (i.e., g++ -pthread -lrt ...) but it should appear near the end.

I'm sorry I don't have the time to make a proper PR and to find out if this really fixes the build on Ubuntu 20.04 (as some modules apparently still can't be build and I don't know if it is related to my changes or they couldn't be build from the start) but it's progress :-)

from cinder.

kobalicek avatar kobalicek commented on May 22, 2024

It would also be possible to define ASMJIT_NO_JIT (ironic name I know) to disable JitRuntime & VirtMem on AsmJit side if Cinder uses its own virtual memory management.

from cinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.