Submitted by mr_jimmybob on Sun, 04/16/2006 - 13:52.
Hello.
I am trying to compile OpenMotif 2.3 (openmotif-2.3.0-20060106.tar.gz) downloaded from your site.
I am running Debian Etch (testing). I dont know what other information would be helpful, If you need more info please say so.
And thanks for your hints. Mark S?nchez.
Here is the latest error given by make:
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I. -I.. -I./.. -DXMBINDDIR_FALLBACK=\"/usr/X11R6/lib/X11/bindings\" -DINCDIR=\"/usr/X11R6/include/X11\" -DLIBDIR=\"/usr/X11R6/lib/X11\" -I/usr/X11R6/include -I/usr/X11R6/include -g -O2 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -I/usr/include -I/usr/include/freetype2 -DXTHREADS -I/usr/X11R6/include -MT Xmos.lo -MD -MP -MF .deps/Xmos.Tpo -c Xmos.c -fPIC -DPIC -o .libs/Xmos.o
Xmos.c:284:43: error: macro "_XGetpwnam" requires 3 arguments, but only 2 given
Xmos.c: In function 'GetQualifiedDir':
Xmos.c:284: error: '_XGetpwnam' undeclared (first use in this function)
Xmos.c:284: error: (Each undeclared identifier is reported only once
Xmos.c:284: error: for each function it appears in.)
Xmos.c:1042:41: error: macro "_XGetpwnam" requires 3 arguments, but only 2 givenXmos.c: In function 'XmeGetHomeDirName':
Xmos.c:1042: error: '_XGetpwnam' undeclared (first use in this function)
Xmos.c:1046:43: error: macro "_XGetpwuid" requires 3 arguments, but only 2 givenXmos.c:1046: error: '_XGetpwuid' undeclared (first use in this function)
make[3]: *** [Xmos.lo] Error 1
make[3]: Leaving directory `/mnt/extra/home/mark/Downloads/openmotif-2.3.0/lib/Xm'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/extra/home/mark/Downloads/openmotif-2.3.0/lib/Xm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/extra/home/mark/Downloads/openmotif-2.3.0/lib'
make: *** [all-recursive] Error 1
And here is the configure info (for if it is helpful):
mark@deepthought:~/Downloads/openmotif-2.3.0$ ./configure
checking for /usr/X/include/X11/X.h... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for byacc... no
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking whether libXt was compiled with -DXTHREADS... yes
checking X11/Xos_r.h usability... yes
checking X11/Xos_r.h presence... yes
checking for X11/Xos_r.h... yes
checking X11/Xpoll.h usability... yes
checking X11/Xpoll.h presence... yes
checking for X11/Xpoll.h... yes
checking X11/Xmu/Editres.h usability... no
checking X11/Xmu/Editres.h presence... yes
configure: WARNING: X11/Xmu/Editres.h: present but cannot be compiled
configure: WARNING: X11/Xmu/Editres.h: check for missing prerequisite headers?
configure: WARNING: X11/Xmu/Editres.h: see the Autoconf documentation
configure: WARNING: X11/Xmu/Editres.h: section "Present But Cannot Be Compiled"
configure: WARNING: X11/Xmu/Editres.h: proceeding with the preprocessor's resultconfigure: WARNING: X11/Xmu/Editres.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
configure: WARNING: ## ------------------------------------------ ##
checking for X11/Xmu/Editres.h... yes
checking for _XEditResCheckMessages in -lXmu... yes
checking for XmuNCopyISOLatin1Lowered in -lXmu... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/malloc.h usability... no
checking sys/malloc.h presence... no
checking for sys/malloc.h... no
checking for strings.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for X11/Xos_r.h... (cached) yes
checking for X11/Xpoll.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... yes
checking whether setpgrp takes no argument... yes
checking return type of signal handlers... void
checking for working strcoll... yes
checking for strftime... yes
checking for unistd.h... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for vprintf... yes
checking for _doprnt... no
checking whether sprintf returns void... yes
checking for wcslen... yes
checking for wcscpy... yes
checking for wcsncpy... yes
checking for wcschr... yes
checking for wcscat... yes
checking for wcsncat... yes
checking for getcwd... yes
checking for gettimeofday... yes
checking for mkdir... yes
checking for re_comp... yes
checking for regcmp... no
checking for select... yes
checking for strcspn... yes
checking for strerror... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for uname... yes
checking for strdup... yes
checking for strcasecmp... yes
checking for putenv... yes
checking for regcomp... yes
checking for memmove... yes
checking for iconv_open in -liconv... no
checking for freetype-config... freetype-config
checking freetype/freetype.h usability... no
checking freetype/freetype.h presence... no
checking for freetype/freetype.h... no
checking X11/extensions/Xrender.h usability... yes
checking X11/extensions/Xrender.h presence... yes
checking for X11/extensions/Xrender.h... yes
checking for XRenderParseColor... yes
checking for fontconfig-config... no
checking fontconfig/fontconfig.h usability... yes
checking fontconfig/fontconfig.h presence... yes
checking for fontconfig/fontconfig.h... yes
checking for FcInit... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_start_decompress... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_create_read_struct... yes
configure: creating ./config.status
[ ... more boring lines deleted ...]
Thanks for your help.
Have fun, Mark.
Sun, 04/16/2006 - 14:05#1
mr_jimmybob
Due to a debian bug
Grrrr. Hello again.
After some further investigation (that always seems to happen *after* posting to the forums).
It seems that it is a Debian bug.
_Xgetpwnam semantics was changed in the headers in the debian packages or something.
If anyone has any intrest Ill try and get back to it.
Sorry for wasting yous time, and as usual...
have fun :)
Mark Sanchez.
Sun, 04/16/2006 - 19:36#2
mr_jimmybob
A possible solution
After sulking all day due to my failure... I thought, hello?, I am an *expert^ C hacker!, so lets start hacking :)
I looked for the calls to _Xgetpwnam() which seem to be a wrapper for getpwnam, as you can see in this define:
From /lib/Xm/Xmos_r.h
# define _XGetpwnam(u,p) getpwnam((u))
And taking a look at the definition of getpwnam we get:
From /usr/include/pwd.h:
extern struct passwd *getpwnam (__const char *__name);
if the define in the Xmos file just ingnores the second arg 'p', maybe I should just ingore the third arg :). Hurray!. Hacking for *hours* and *hours* on end, 2 pizzas and 7 beers later I just added a NULL for the expected third arg where _XGetpwnam(...) was called.
Well, OpenMotif 2.3.0 *did* compile. I dont know if one day an app using the gui will turn evil and eat my goldfish because of this very silly hack (well, hack to call it something).
Ah yes, and Kids!, dont try this at home!
Thanks for listening and happy coding.
Mark Sanchez.
Sat, 10/13/2007 - 12:53#3
messchendorp
thanks
Thanks, I applied your suggestion as well, without the 2 pizza's and 7 beers....
Johan.
Thu, 11/01/2007 - 17:13#4
roger.moore
../Xm/Xm.h:76:34: error: X11/extensions/Print.h: No such fil
Hi,
Sorry, but its not clear to me. Do you mean, Mark, that for every instance of,
_XGetpwnam(u,p)
in all the source files in the openmotif directory, you replaced it with _XGetpwnam(u,p,NULL)? FYI, I'm compiling this on Ubuntu, which was derived from Debian. Does anyone have any suggestions? Below is the result of my make command after changing the source files.
TIA,
Roger
roger@randy-vmubuntu:/usr/src/openmotif-2.3.0# make
Making all in bindings
make[1]: Entering directory `/usr/src/openmotif-2.3.0/bindings'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/openmotif-2.3.0/bindings'
Making all in bitmaps
make[1]: Entering directory `/usr/src/openmotif-2.3.0/bitmaps'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/openmotif-2.3.0/bitmaps'
Making all in config
make[1]: Entering directory `/usr/src/openmotif-2.3.0/config'
Making all in cf
make[2]: Entering directory `/usr/src/openmotif-2.3.0/config/cf'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/config/cf'
Making all in imake
make[2]: Entering directory `/usr/src/openmotif-2.3.0/config/imake'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/config/imake'
Making all in makedepend
make[2]: Entering directory `/usr/src/openmotif-2.3.0/config/makedepend'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/config/makedepend'
Making all in util
make[2]: Entering directory `/usr/src/openmotif-2.3.0/config/util'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/config/util'
make[2]: Entering directory `/usr/src/openmotif-2.3.0/config'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/config'
make[1]: Leaving directory `/usr/src/openmotif-2.3.0/config'
Making all in localized
make[1]: Entering directory `/usr/src/openmotif-2.3.0/localized'
Making all in util
make[2]: Entering directory `/usr/src/openmotif-2.3.0/localized/util'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/localized/util'
make[2]: Entering directory `/usr/src/openmotif-2.3.0/localized'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/localized'
make[1]: Leaving directory `/usr/src/openmotif-2.3.0/localized'
Making all in lib
make[1]: Entering directory `/usr/src/openmotif-2.3.0/lib'
Making all in Xm
make[2]: Entering directory `/usr/src/openmotif-2.3.0/lib/Xm'
make all-am
make[3]: Entering directory `/usr/src/openmotif-2.3.0/lib/Xm'
if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I. -I.. -I./.. -DXMBINDDIR_FALLBACK=\"/usr/X11R6/lib/X11/bindings\" -DINCDIR=\"/usr/X11R6/include/X11\" -DLIBDIR=\"/usr/X11R6/lib/X11\" -g -O2 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -MT XmStrDefs.lo -MD -MP -MF ".deps/XmStrDefs.Tpo" -c -o XmStrDefs.lo XmStrDefs.c; \
then mv -f ".deps/XmStrDefs.Tpo" ".deps/XmStrDefs.Plo"; else rm -f ".deps/XmStrDefs.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I. -I.. -I./.. -DXMBINDDIR_FALLBACK=\"/usr/X11R6/lib/X11/bindings\" -DINCDIR=\"/usr/X11R6/include/X11\" -DLIBDIR=\"/usr/X11R6/lib/X11\" -g -O2 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -MT XmStrDefs.lo -MD -MP -MF .deps/XmStrDefs.Tpo -c XmStrDefs.c -fPIC -DPIC -o .libs/XmStrDefs.o
In file included from XmStrDefs.c:10:
../Xm/Xm.h:76:34: error: X11/extensions/Print.h: No such file or directory
In file included from XmStrDefs.c:10:
../Xm/Xm.h:858: error: syntax error before 'XPContext'
../Xm/Xm.h:858: warning: no semicolon at end of struct or union
../Xm/Xm.h:861: error: syntax error before '}' token
../Xm/Xm.h:861: warning: type defaults to 'int' in declaration of 'XmPrintShellCallbackStruct'
../Xm/Xm.h:861: warning: data definition has no type or storage class
make[3]: *** [XmStrDefs.lo] Error 1
make[3]: Leaving directory `/usr/src/openmotif-2.3.0/lib/Xm'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/openmotif-2.3.0/lib/Xm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/openmotif-2.3.0/lib'
make: *** [all-recursive] Error 1
roger@randy-vmubuntu:/usr/src/openmotif-2.3.0#
Sun, 02/17/2008 - 00:18#5
mr_jimmybob
OpenMotif 2.3.0 Fails to compile ...
Hello Roger.
Yes. I replaced every call of _XGetpwnam(a,b) with _XGetpwnam(a,b,NULL) for any given a and b.
It did the trick for me back then.
But, looking at your compile errors the problems seems to be something else.
The line : X11/extensions/Print.h: No such file or directory
does not look good.
Maybe you are missing some extensions (some dev includes or something else). Print.h is part of the X Print Extension Library standard, I think it is the libxp-dev package. Try to install it and see if the error remains.
Try and see if any of this helps.
If not, get back here and we will see what more can be done.
Regards Mark.