Hello all, I am trying to install Magic on CentOS....
# magic
t
Hello all, I am trying to install Magic on CentOS. I pulled the latest version of magic from github and followed the instructions in the INSTALL file. The first command "./configure" worked well but I got stuck on the second "make" command. It seems that there're some multiple definitions. I also tried the "make install" and not surprisingly, it doesn't work. Does anyone know how to fix it? Please excuse me if this is something very simple. I am quite new to magic and Linux.
a
You have either missing libraries (most likely missing tck/tk), or broken compiler. If you can give us your OS and what packages you installed, I might be able to help you. Easiest way to run magic is through docker (assumes that OPEN_PDKS_COMMIT and SKYWATER_COMMIT is defined, if not remove coresponding line). docker run -it --rm -v $PWD:/openLANE_flow \ -v $PDK_ROOT:$PDK_ROOT \ -e PDK_ROOT=$PDK_ROOT \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix$DISPLAY \ -e OPEN_PDKS_COMMIT=$OPEN_PDKS_COMMIT \ -e SKYWATER_COMMIT=$SKYWATER_COMMIT \ -u $(id -u $USER):$(id -g $USER) \ efabless/openlane:v0.15 Then inside docker: magic -rcfile $PDK_ROOT/sky130A/libs.tech/magic/sky130A.magicrc
t
Hi, thanks for the reply! I referred to http://opencircuitdesign.com/magic/install.html for required packages. The commands given in the website are for Ubuntu apt-get, so I'm not sure whether I find the right counterparts for CentOS yum. The following packages are in the list after "yum list installed": libX11-devel.x86_64 tcl.x86_64 tcl-devel.x86_64 tcl_wrappers-libs.x86_64 tk.x86_64 tk-devel.x86_64 cairo.x86_64 cairo-devel.x86_64 mesa-libGL.x86_64 mesa-libGL-devel.x86_64 mesa-libGLU.x86_64 mesa-libGLU-devel.x86_64 ncurses.x86_64 ncurses-base.noarch ncurses-devel.x86_64 ncurses-libs.x86_64 When it comes to the complier, there are some messages that I found suspicious after "./configure" and I posted them on the image below. I did run "yum install gcc" this morning and gcc.x86_64 is there in my installed list. Did I do it right? For some reasons, docker might not be an option for my project. Sorry.
a
If you are using centos, then you should be able to straight-up use their build script which is in the form of dockerfile, even without docker. Also I would try to install g++.
Also tcsh/csh/m4 might be missing (idk if its installed by default). At the end of .configure it gives a list of features missing, it will also be helpful
t
@Tianyu Wei: I develop magic on both a Fedora system (similar to CentOS) and a Debian system, and the make/install process works fine on both. As @Arman Avetisyan noted, you are probably missing dependencies; make sure you have
tcsh
and
m4
. Also: If you tried to run
make
at any time before you installed
tcl-devel
and
tk-devel
, then you will need to do
make clean
before re-running
configure
. If that doesn't work, then please send the output of
configure
(file, please, not a screenshot).
t
Hi, here is my output after
sudo make clean
and
./configure
: checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for library containing strerror... none required checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking size of void *... 8 checking size of unsigned int... 4 checking size of unsigned long... 8 checking size of unsigned long long... 8 checking whether byte ordering is bigendian... no checking for ANSI C header files... (cached) yes checking for setenv... yes checking for putenv... yes checking for vfork... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking param.h usability... no checking param.h presence... no checking for param.h... no checking paths.h usability... yes checking paths.h presence... yes checking for paths.h... yes checking for va_copy... yes checking for __va_copy... yes checking for gcore... /usr/bin/gcore checking for csh... /usr/bin/csh checking for python3... /usr/bin/python3 checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... no
checking for XOpenDevice in -lXi... no checking for XmuInternAtom in -lXmu... no checking for XextFindDisplay in -lXext... yes checking for tclConfig.sh... /usr/lib64/tclConfig.sh checking for tkConfig.sh... /usr/lib64/tkConfig.sh checking for wish executable... /usr/bin/wish checking for tclsh executable... /usr/bin/tclsh checking GL/gl.h usability... yes checking GL/gl.h presence... yes checking for GL/gl.h... yes checking for glXCreateContext in -lGL... yes checking for gluNewTess in -lGLU... yes checking cairo/cairo.h usability... yes checking cairo/cairo.h presence... yes checking for cairo/cairo.h... yes checking for cairo_user_to_device in -lcairo... yes configure: creating ./config.status config.status: creating defs.mak config.status: WARNING: 'defs.mak.in' seems to ignore the --datarootdir setting ----------------------------------------------------------- Configuration Summary (principle requirements): X11: yes Python3: yes OpenGL: yes Vector fonts: yes Cairo: yes Tcl/Tk: yes ----------------------------------------------------------- Use 'make' to compile and 'make install' to install. Errors may not be printed to stdout: see files 'make.log' and 'install.log' for complete error summary. -----------------------------------------------------------
After that,
make
and
make install
seem to be successful except for the 2 warnings (after
make
): grTkCommon.c7615: warning: initialization from incompatible pointer type [enabled by default] grTkCommon.c7615: warning: (near initialization for 'tkLayerImageType.createProc') [enabled by default] But when I tried to run
make tut1
I received the following output: Application initialization failed: no display name and no $DISPLAY environment variable Error in startup script: no display name and no $DISPLAY environment variable while executing "load /usr/lib64/tk8.5/../libtk8.5.so Tk" ("package ifneeded Tk 8.5.13" script) invoked from within "package require Tk $tcl_version" invoked from within "if {$tcl_version < 8.0} { return -code error "tkcon requires at least Tcl/Tk8" } else { # Prevent breaking on version 8.5.2 # package requ..." (file "/usr/local/lib/magic/tcl/tkcon.tcl" line 44)
t
I assume you meant
magic tut1
not
make tut1
, above. The
no display name
error indicates you are not running in an X11 environment. Are you doing this on a virtual machine or something?
t
Yes,
magic tut1
. I am doing it on the remote Google Cloud compute engine.
t
If you intend to run magic as a batch process, then you would want to always run magic as
magic -dnull -noconsole
and do everything from the command-line prompt. If you want a full layout GUI, you will need to figure out how to run applications with an X11 server. I'm not familiar with Google Cloud services so I can't advise you how to do this.
t
It worked! Thank you very much for your help and patience! @Arman Avetisyan @Tim Edwards