[xcrysden] Cannot compile xcrysden because of XVisualInfo error

X Y xy45388 at gmail.com
Mon May 8 19:41:13 CEST 2017


Dear Tone,
thanks for looking into it.
With the changes I got this


cc -g   -O2 detnsplit.o xcAppInit.o xcballstick.o xcviewport.o xcLabels.o
vectors.o xcDisplayFunc2.o xcAtomAdd.o loadValues.o hpsort.o auxilproc.o
xcdebug.o 3D.o xcDisplayFunc.o readstrf.o mxmymz.o remakestr.o xcSelect.o
readisodata.o lighting.o xcGLparam.o colorplane.o isorender.o polygonise.o
polygonise_auxil.o xcIsoSurf.o voronoi.o xcBz.o xcSuperCell.o
xcPrimitives.o setOpenGLState.o memory.o isoMalloc.o isoInterpolate.o
readPlvertex.o splineInt.o paraSize.o isoline.o xcIsoSpaceSel.o cells.o
xcWigner.o xcTogl.o datagrid.o sInfo.o xcIsoDataGrid.o xcColorScheme.o
xcReadXSF.o xcF3toI4.o xcFractCoor.o signal.o MarchCubes.o isosurf.o
xcMolSurf.o cryNewContext.o fs.o cryDispFunc.o cryDispFuncMultiFS.o
crySetProj.o crySurfArgs.o crySurf.o cryTransform.o cryClip.o cryTogl.o
forces.o xcForces.o gl2psPrintTogl.o ppmPrintTogl.o lcasi.o lcasif.o
xcFont.o fog.o writeXSF.o hbonds.o xcHBonds.o linear.o realTimeMovie.o
getline.o gridNormals.o fft3d.o fft_util.o shank3d.o shank_Hinv.o
shank_util.o togl.o gl2ps.o sgiRasterFont.o sgiAux.o \
-o xcrys -lfftw3  -ltk85 -ltkstub85 -L/usr/lib -ltcl85 -ltclstub85  -lglu32
-lopengl32 -lgdi32
/usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../i686-pc-cygwin/bin/ld: cannot
find -ltk85
/usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../i686-pc-cygwin/bin/ld: cannot
find -ltkstub85
/usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../i686-pc-cygwin/bin/ld: cannot
find -ltcl85
/usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../i686-pc-cygwin/bin/ld: cannot
find -ltclstub85
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:31: xcrys] Error 1
make[2]: Leaving directory '/home/Dave/xcrysden-1.5.60/C'
make[1]: *** [Makefile:23: compile] Error 2
make[1]: Leaving directory '/home/Dave/xcrysden-1.5.60/C'
make: *** [Makefile:77: src-C] Error 2

But it gave me a big hint that TCL_VER      = 85
might be wrong too.
Then I tried to change TCL_VER into 8.5, 8.5.19, 8.4
TCL_VER      = 8.6 finally did something but gave other errors
( removed the middle part because the error trace is very long):

cc -g  -O2 -DCYGWIN -DUSE_FONTS -DNEAR_BUG -DUSE_INTERP_RESULT
-DUSE_FONTS   -I/usr/src/tcltk-20080420-1/tcl/generic -DUSE_TCL_STUBS
-I/usr/src/tcltk-20080420-1/tk/generic  -I/usr/src/tcltk-20080420-1/tk/win/
-DUSE_TK_STUBS -I/usr/src/tcltk-20080420-1/tk/xlib -I/usr/include/GL   -c
sgiRasterFont.c
cc -g  -O2 -DCYGWIN -DUSE_FONTS -DNEAR_BUG -DUSE_INTERP_RESULT
-DUSE_FONTS   -I/usr/src/tcltk-20080420-1/tcl/generic -DUSE_TCL_STUBS
-I/usr/src/tcltk-20080420-1/tk/generic  -I/usr/src/tcltk-20080420-1/tk/win/
-DUSE_TK_STUBS -I/usr/src/tcltk-20080420-1/tk/xlib -I/usr/include/GL   -c
sgiAux.c
cc -g   -O2 detnsplit.o xcAppInit.o xcballstick.o xcviewport.o xcLabels.o
vectors.o xcDisplayFunc2.o xcAtomAdd.o loadValues.o hpsort.o auxilproc.o
xcdebug.o 3D.o xcDisplayFunc.o readstrf.o mxmymz.o remakestr.o xcSelect.o
readisodata.o lighting.o xcGLparam.o colorplane.o isorender.o polygonise.o
polygonise_auxil.o xcIsoSurf.o voronoi.o xcBz.o xcSuperCell.o
xcPrimitives.o setOpenGLState.o memory.o isoMalloc.o isoInterpolate.o
readPlvertex.o splineInt.o paraSize.o isoline.o xcIsoSpaceSel.o cells.o
xcWigner.o xcTogl.o datagrid.o sInfo.o xcIsoDataGrid.o xcColorScheme.o
xcReadXSF.o xcF3toI4.o xcFractCoor.o signal.o MarchCubes.o isosurf.o
xcMolSurf.o cryNewContext.o fs.o cryDispFunc.o cryDispFuncMultiFS.o
crySetProj.o crySurfArgs.o crySurf.o cryTransform.o cryClip.o cryTogl.o
forces.o xcForces.o gl2psPrintTogl.o ppmPrintTogl.o lcasi.o lcasif.o
xcFont.o fog.o writeXSF.o hbonds.o xcHBonds.o linear.o realTimeMovie.o
getline.o gridNormals.o fft3d.o fft_util.o shank3d.o shank_Hinv.o
shank_util.o togl.o gl2ps.o sgiRasterFont.o sgiAux.o \
-o xcrys -lfftw3  -ltk8.6 -ltkstub8.6 -L/usr/lib -ltcl8.6 -ltclstub8.6
-lglu32 -lopengl32 -lgdi32
/usr/lib/libtclstub8.6.a(tclStubLib.o): In function `Tcl_InitStubs':
/usr/src/debug/tcl-8.6.6-1/generic/tclStubLib.c:58: multiple definition of
`Tcl_InitStubs'
/usr/lib/libtk8.6.dll.a(d000001.o):(.text+0x0): first defined here
xcAppInit.o: In function `XErrorFunction':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:403: undefined reference to
`XGetErrorText'
xcAppInit.o: In function `XC_StereoCmd':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:2626: undefined reference to
`XOpenDisplay'
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:2628: undefined reference to
`glXChooseVisual'
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:2631: undefined reference to
`XFree'
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:2633: undefined reference to
`XCloseDisplay'
xcAppInit.o: In function `XC_DrawStyle3DCmd':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:1778: undefined reference to
`glGetBooleanv'
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:1774: undefined reference to
`glDrawBuffer'
xcAppInit.o: In function `XC_ShadeModel3DCmd':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:1836: undefined reference to
`glShadeModel'
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:1832: undefined reference to
`glShadeModel'
xcAppInit.o: In function `XC_PointSizeCmd':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:1879: undefined reference to
`glPointSize'
xcAppInit.o: In function `main':
/home/Dave/xcrysden-1.5.60/C/xcAppInit.c:437: undefined reference to
`XSetErrorHandler'

.....

/home/Dave/xcrysden-1.5.60/C/gl2ps.c:6051: undefined reference to
`glPassThrough'
/home/Dave/xcrysden-1.5.60/C/gl2ps.c:6042: undefined reference to
`glPassThrough'
/home/Dave/xcrysden-1.5.60/C/gl2ps.c:6048: undefined reference to
`glPassThrough'
gl2ps.o:/home/Dave/xcrysden-1.5.60/C/gl2ps.c:6045: more undefined
references to `glPassThrough' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:31: xcrys] Error 1
make[2]: Leaving directory '/home/Dave/xcrysden-1.5.60/C'
make[1]: *** [Makefile:23: compile] Error 2
make[1]: Leaving directory '/home/Dave/xcrysden-1.5.60/C'
make: *** [Makefile:77: src-C] Error 2


My Make.sys is now:

#########################################################################
#
# System-dependent definitions CYGWIN.
#
# EDIT ACCORDING TO YOUR OWN NEEDS !!!
#
########################################################################

MAKE   = make
#CYGWIN = -f Makefile.cygwin

#------------------------------------------------------------------------
# compilers & flags
#------------------------------------------------------------------------
CC          = cc -g
SHARED      = -shared
CFLAGS      = -O2
#-mno-cygwin
#-mcygwin

CPPFLAGS    = -DCYGWIN -DUSE_FONTS -DNEAR_BUG -DUSE_INTERP_RESULT
LDLIB       =
MATH        =

FC          = g77 -O2
# -mcygwin
FFLAGS      =

#------------------------------------------------------------------------
# Libraries and include files
#------------------------------------------------------------------------
X_LIB       =
# -L/usr/X11R6/lib -lX11.dll
X_INCDIR    =


TCL_PREFIX   = /usr
TCL_VER      = 8.6
TCL_LIB      = -L$(TCL_PREFIX)/lib -ltcl$(TCL_VER) -ltclstub$(TCL_VER)
TK_LIB       = -ltk$(TCL_VER) -ltkstub$(TCL_VER)
GLU_LIB      = -lglu32
GL_LIB       = -lopengl32 -lgdi32
FFTW3_LIB    = -lfftw3
# this is only used for some testing purposes
#MESCHACH_LIB =

TCLTK_SRC   = /usr/src/tcltk-20080420-1
# on some machines this is needed: -I$(TCLTK_SRC)/tk/xlib
TCL_INCDIR      = -I$(TCLTK_SRC)/tcl/generic -DUSE_TCL_STUBS
TK_INCDIR       = -I$(TCLTK_SRC)/tk/generic  -I$(TCLTK_SRC)/tk/win/
-DUSE_TK_STUBS -I$(TCLTK_SRC)/tk/xlib
GL_INCDIR       = -I/usr/include/GL
FFTW3_INCDIR    =
# this is only used for some testing purposes
#MESCHACH_INCDIR =

#------------------------------------------------------------------------

Kind regards,
Dave


2017-05-08 11:02 GMT+02:00 Tone Kokalj <tone.kokalj at ijs.si>:

> On Wed, 2017-05-03 at 22:55 +0200, X Y wrote:
> > Hello,
> > when I compile I get stuck on the line with the  unknown type name
> > ‘XVisualInfo’ error.
> > Because I have a windows 10 computer I compile inside the cygwin 32
> > bit environment
>
> Edit your Make.sys file and remove the -DWIN32 from CPPFLAGS.
> Then try to recompile (make clean; make xcrysden)
>
> If it does not work then also remove or comment the
> "CYGWIN = -f Makefile.cygwin" line and recompile.
>
> Best regards, Tone
> --
> J. Stefan Institute, Jamova 39, 1000 Ljubljana, Slovenia
> (tel: +386-1-
> 477-3523 // fax: +386-1-251-9385)
>
> _______________________________________________
> XCrySDen mailing list
> XCrySDen at democritos.it
> http://www.democritos.it/mailman/listinfo/xcrysden
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.democritos.it/pipermail/xcrysden/attachments/20170508/d0069ef0/attachment.htm 


More information about the XCrySDen mailing list