Comiling Source - New Thread

Howdy folks!!

So i’ve gotten the dtoolbase & dtoolutil to build. When the compiler goes to finish building dtool the following error occurs:

------ Build started: Project: dtool, Configuration: Opt1-Win32 Win32 ------

Linking...
   Creating library Opt1-Win32\libdtool_d.lib and object Opt1-Win32\libdtool_d.exp
Copying Opt1-Win32\libdtool_d.dll to C:\usr\lib\python2.2\site-packages...
Does C:\usr\local\panda\bin specify a file name
or directory name on the target
(F = file, D = directory)? ?
Does C:\usr\local\panda\bin specify a file name
or directory name on the target
(F = file, D = directory)? Project : error PRJ0019: A tool returned an error code: "Copying Opt1-Win32\libdtool_d.dll to C:\usr\lib\python2.2\site-packages..."

Build log was saved at "file://c:\Panda3d\dtool\metalibs\dtool\Opt1-Win32\BuildLog.htm"
dtool - 1 error(s), 0 warning(s)

Any thoughts??

Thanks,

wigs

I see from the error messages that you have posted that you are using the non-Cygwin build scripts (nmake), and that your ppremake.exe was compiled without the Cygwin environment. There’s nothing wrong with that whatsoever; I only bring it up because you mentioned in another post that you have Cygwin installed, so I wanted to make sure you went the non-Cygwin build route intentionally.

The error message you are seeing is the result of the directory C:\usr\local\panda\bin not existing when the Makefile tries to invoke xcopy to put some files there. However, I don’t know what file it’s trying to put there, or why ppremake didn’t create the directory. Can you paste in the contents of your dtool/metalibs/dtool/Makefile? It might shed some light if I see this file.

David

Hey David,

Okay I had path I fixed the last issue before I saw your response. There was an incorrect path in my config.pp. Also, I did switch to using non-cygwin and have been having much better results. Right now I have 3 errors that I’m encountering that I can’t seem to get past:

  1. When compiling py.stub I get the following warning:
Compiling...
pystub.cxx
Linking...
   Creating library Opt1-Win32\libpystub_d.lib and object Opt1-Win32\libpystub_d.exp
LINK : warning LNK4089: all references to 'libdtool_d.dll' discarded by /OPT:REF
Copying Opt1-Win32\libpystub_d.dll to C:\Panda3d\lib...
1 File(s) copied

Not sure if that will cause any problems

  1. Copiling errors in parsefile, interrogate_module & interrogate

LINK : fatal error LNK1181: cannot open input file 'libcppParser_d.lib'
  1. I do not seem to have the Bison header files. What the heck is Bison?
Compiling...
cppParser_composite2.cxx
c:\Panda3d\dtool\src\cppparser\cppExpression.cxx(32) : fatal error C1083: Cannot open include file: 'cppBison.h': No such file or directory
cppParser_composite1.cxx
c:\Panda3d\dtool\src\cppparser\cppPreprocessor.cxx(30) : fatal error C1083: Cannot open include file: 'cppBison.h': No such file or directory
cppBison.cxx
c1xx : fatal error C1083: Cannot open source file: 'cppBison.cxx': No such file or directory
Generating Code...

Sorry for posts being so screwy. This one should be more clear. If any other information would help just let me know.

Thanks again,

Mike

Generated automatically by ppremake 1.16 from Sources.pp.

################################ DO NOT EDIT ###########################

MAKEFLAGS := -j1

all : Makefile pp.dep Opt1-Win32/libdtool_d.dll

test :

clean : clean-igate
rm -f Opt1-Win32/dtool_dtool.obj
rm -f Opt1-Win32/libdtool_d.dll

cleanall : clean
rm -rf Opt1-Win32
rm -f pp.dep

clean-igate :

install : all install-libdtool

install-igate :

uninstall : uninstall-libdtool

uninstall-igate :

igate :

libdtool_so =
Opt1-Win32/dtool_dtool.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_gnu_getopt.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_gnu_getopt1.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_dtoolutil_composite1.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_dtoolutil_composite2.obj
…/…/src/dtoolbase/Opt1-Win32/dtoolbase_dtoolbase.obj

.NOTPARALLEL Opt1-Win32/libdtool_d.dll : (libdtool_so) link /nologo /DLL /DEBUG /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 /NODEFAULTLIB:LIBCI.LIB /NODEFAULTLIB:MSVCRT.LIB /OUT:"Opt1-Win32\libdtool_d.dll" (libdtool_so) /LIBPATH:“C:\nspr-4.4.1\lib” libnspr4.lib

Opt1-Win32/libdtool_d.lib : Opt1-Win32/libdtool_d.dll
Opt1-Win32/libdtool_d.pdb : Opt1-Win32/libdtool_d.dll

install-libdtool :
/c/Panda3d/lib/libdtool_d.dll /c/Panda3d/lib/libdtool_d.lib
/c/Panda3d/lib/libdtool_d.pdb

uninstall-libdtool :
rm -f /c/Panda3d/lib/libdtool_d.dll /c/Panda3d/lib/libdtool_d.lib /c/Panda3d/lib/libdtool_d.pdb

/c/Panda3d/lib/libdtool_d.dll : Opt1-Win32/libdtool_d.dll
cp -f Opt1-Win32/libdtool_d.dll /c/Panda3d/lib/

/c/Panda3d/lib/libdtool_d.lib : Opt1-Win32/libdtool_d.lib
cp -f Opt1-Win32/libdtool_d.lib /c/Panda3d/lib/

/c/Panda3d/lib/libdtool_d.pdb : Opt1-Win32/libdtool_d.pdb
cp -f Opt1-Win32/libdtool_d.pdb /c/Panda3d/lib/

Opt1-Win32/dtool_dtool.obj : dtool.cxx
cl /Fo"Opt1-Win32\dtool_dtool.obj" /nologo /c /I"." /I"C:\cygwin\home\Wigand\panda3d\dtool" /I"…\src\dtoolbase" /I"…\src\dtoolutil" /I"C:\nspr-4.4.1\include" /I"C:\Python22\include" /D_DEBUG /DHAVE_DINKUM /Zc:forScope /MDd /Zi /Fd"Opt1-Win32\dtool_dtool.pdb" /RTCs /GS /DBUILDING_DTOOL /EHsc /Zm350 /DWIN32_VC /DWIN32 /W3 “dtool.cxx”

Makefile : Sources.pp
ppremake

pp.dep : dtool.cxx
@ppremake -D pp.dep

  1. This is a normal warning, generated by the compiler which we have no control over. It is completely ignorable.

  2. This error occurs because you have not yet successfully built the cppparser directory (see problem 3). Did you specifically cd into these directories and try to make them by hand? Normally you would just type nmake from the root dtool directory, which should not attempt to build parsefile, interrogate_module, and interrogate until it has successfully built cppparser.

  3. bison is a GNU program, based on a classic Unix utility called yacc, that is used to generate C code to parse a file as described by a context-independent grammar. In this case, it is used to generate the C++ parser for interrogate. We also use bison in a few other places within Panda (in particular, in the panda/src/egg and the direct/src/dcparser directories).

You don’t need to have bison, since we have the prebuilt output from bison checked into the tree as cppBison.cxx.prebuilt and cppBison.h.prebuilt.

If you do not have bison, the ppremake scripts are supposed to generate makefiles that copy the *.prebuilt files into cppBison.cxx and cppBison.h, respectively. However, I just discovered that these rules were broken in the non-Cygwin case. I have checked in a fix; you can pick up version 1.5 of dtool/pptempl/Template.nmake.pp when it is available on anonymous cvs and run ppremake again; or in the meantime you can simply copy the files by hand.

David

drwr wrote:
2. This error occurs because you have not yet successfully built the cppparser directory (see problem 3). Did you specifically cd into these directories and try to make them by hand?

Actually I launched the .sln that was created by ppremake. Should I not be doing that?

ppremake created a .dln file when you ran it in dtool? You must have set your BUILD_TYPE to msvc. Don’t do that–that mode doesn’t work yet (unless someone at CMU has been developing on it outside of my knowledge).

Set BUILD_TYPE to nmake instead, then use the nmake command from the root of the dtool directory to build.

Are you following the step-by-step instructions in the INSTALL document?

David

David I started installation from scratch. Here is documentation of what steps I’ve gone through and where I am crashing at:

Panda3D Install

  1. Install Support Libraries – Placed in individual folder off of C:
    a. Python – Installed
    b. NSPR – Installed
    c. VRPN – Installed
    d. Libpng – Installed
    e. Zlib – Installed
    f. Fmod – Installed
    g. Panda source extracted C:\Panda3d-src - Done

  2. Configuring Panda For Your Environment (Config.pp)
    a. Pathing for Support Libraries defined - Done
    b. Optimize Level is 1 – Done
    c. Set INSTALL_DIR to C:\Panda3d-src - Done
    d. BUILD_TYPE set to gmsvc – Done
    i. (FROM INSTALL DOC) Note: although Panda can be built without Cygwin, for the moment we have dropped support for the Microsoft nmake program.

  3. Building Panda – Windows System Without Cygwin
    a. C:\Panda3d-src\bin & C:\Panda3d-src\bin – Created
    b. make.exe, cp.exe, rm.exe, sh.exe, cygwin1.dll, cygintl-2.dll, cygiconv-2.dll Placed in C:\Panda3d-src\bin - Done
    c. Building ppremake
    i. VC7 Project File – Compiled in Release mode
    ii. ppremake.exe place in C:\Panda3d-src\bin – Done
    d. Panda bin & lib directories placed on path – Done
    e. PANDA_ROOT set – done
    f. Create directory for the panda build to be placed C:\Panda3d - Done
    g. Custom Config.pp file placed in C:\Panda3d-src
    h. PPREMAKE_CONFIG set to correct path – Done
    i. Build dtool
    i. cd to the dtool directory – done
    ii. run ppremake – ERROR

[code]

Root is /Panda3d-src/dtool
Unable to open include file Config.pp.
Error reading Package.pp.
[\code]
1. I copied the custom Config.pp into the dtool folder and ran ppremake again.
2. Makefiles generated with no errors
iii. Build Panda3d sources – dtool
1. run make from the dtool directory – ERROR


C:\Panda3d-src\dtool>make
cd ./src/dtoolbase && make all
make[1]: Entering directory `/cygdrive/c/Panda3d-src/dtool/src/dtoolbase'
cl /Fo"Opt1-Win32\dtoolbase_dtoolbase.obj" /nologo /c /I"." /I"C:\Panda3d-src\dt
ool" /I"C:\nspr-4.4.1\include" /I"C:\Python22\include"   /D_DEBUG /DHAVE_DINKUM
/Zc:forScope /MDd   /Zi /Fd"Opt1-Win32\dtoolbase_dtoolbase.pdb" /RTCs /GS /DBUIL
DING_DTOOL /EHsc /Zm350 /DWIN32_VC /DWIN32 /W3  "dtoolbase.cxx"
cl: not found
make[1]: *** [Opt1-Win32/dtoolbase_dtoolbase.obj] Error 127
make[1]: Leaving directory `/cygdrive/c/Panda3d-src/dtool/src/dtoolbase'
make: *** [dtoolbase] Error 2

In the next post I will place the makefile

Generated automatically by ppremake 1.16 from Sources.pp.

################################ DO NOT EDIT ###########################

MAKEFLAGS := -j1

all : Makefile pp.dep Opt1-Win32/libdtool_d.dll

test :

clean : clean-igate
rm -f Opt1-Win32/dtool_dtool.obj
rm -f Opt1-Win32/libdtool_d.dll

cleanall : clean
rm -rf Opt1-Win32
rm -f pp.dep

clean-igate :

install : all install-libdtool

install-igate :

uninstall : uninstall-libdtool

uninstall-igate :

igate :

libdtool_so =
Opt1-Win32/dtool_dtool.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_gnu_getopt.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_gnu_getopt1.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_dtoolutil_composite1.obj
…/…/src/dtoolutil/Opt1-Win32/dtoolutil_dtoolutil_composite2.obj
…/…/src/dtoolbase/Opt1-Win32/dtoolbase_dtoolbase.obj

.NOTPARALLEL Opt1-Win32/libdtool_d.dll : (libdtool_so) link /nologo /DLL /DEBUG /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 /NODEFAULTLIB:LIBCI.LIB /NODEFAULTLIB:MSVCRT.LIB /OUT:"Opt1-Win32\libdtool_d.dll" (libdtool_so) /LIBPATH:“C:\nspr-4.4.1\lib” /LIBPATH:“C:\Python22\libs” libnspr4.lib

Opt1-Win32/libdtool_d.lib : Opt1-Win32/libdtool_d.dll
Opt1-Win32/libdtool_d.pdb : Opt1-Win32/libdtool_d.dll

install-libdtool :
/c/Panda3d-src/lib/libdtool_d.dll /c/Panda3d-src/lib/libdtool_d.lib
/c/Panda3d-src/lib/libdtool_d.pdb

uninstall-libdtool :
rm -f /c/Panda3d-src/lib/libdtool_d.dll /c/Panda3d-src/lib/libdtool_d.lib /c/Panda3d-src/lib/libdtool_d.pdb

/c/Panda3d-src/lib/libdtool_d.dll : Opt1-Win32/libdtool_d.dll
cp -f Opt1-Win32/libdtool_d.dll /c/Panda3d-src/lib/

/c/Panda3d-src/lib/libdtool_d.lib : Opt1-Win32/libdtool_d.lib
cp -f Opt1-Win32/libdtool_d.lib /c/Panda3d-src/lib/

/c/Panda3d-src/lib/libdtool_d.pdb : Opt1-Win32/libdtool_d.pdb
cp -f Opt1-Win32/libdtool_d.pdb /c/Panda3d-src/lib/

Opt1-Win32/dtool_dtool.obj : dtool.cxx
cl /Fo"Opt1-Win32\dtool_dtool.obj" /nologo /c /I"." /I"C:\Panda3d-src\dtool" /I"…\src\dtoolbase" /I"…\src\dtoolutil" /I"C:\nspr-4.4.1\include" /I"C:\Python22\include" /D_DEBUG /DHAVE_DINKUM /Zc:forScope /MDd /Zi /Fd"Opt1-Win32\dtool_dtool.pdb" /RTCs /GS /DBUILDING_DTOOL /EHsc /Zm350 /DWIN32_VC /DWIN32 /W3 “dtool.cxx”

Makefile : Sources.pp
ppremake

pp.dep : dtool.cxx
@ppremake -D pp.dep

Once again anyhelp is appreciated thank you!!

Mike

Hi Wigs,

Here are my comments.

2i. This is an old comment. As of the latest version in CVS, we once again support nmake. I infer that you are building from the panda3d-2004-07-27.tar.gz tarball on SourceForge; however, this tarball is several months old. I have not updated this recently because I was still waiting to merge with the latest from the CMU team.

That being said, the old code does build, so it’s perfectly reasonable to stick with this old tarball. But the latest CVS code does have a few bugfixes (as well as its share of new bugs, no doubt).

3ii. There should already have been a standard Config.pp in the dtool folder, which you should not overwrite. Was this file missing for some reason? We should investigate further why ppremake failed at this point–it may be important.

3iii. cl: not found
This means that the MSVC7 command-line compiler was not present on the system PATH. That should have been done automatically when the compiler was installed; but maybe there’s some checkbox you have to mark when you go through the MSVC7 installer–I don’t fully remember. (It also should have added itself to the system INCLUDE and LIB variables.)

In any case, you need to remedy this now. You can run the bat file c:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat to set up these variables for you before you open your Cygwin shell (or assign all the variables appropriately in your .cshrc or .bashrc within your Cygwin shell).

David

David,

As to the Config.pp in the dtool folder I followed the instructions of the Install document and saved the orignal as a sample to use in creation of my own custom Config.pp. They are very similar, except for the changes that I stated earlier. As to the Config not being found when place in the root directory, I would assume that setting PPREMAKE_CONFIG is not the only thing that needs to be done to point ppremake at the appropriate path. Is that path hard coded elseware? Anyway my custom config is being parsed.

I got the cl error fixed thank you. Running vcvars32.bat worked just fine.

I have a new error code now upon running make within the dtool folder:


link /nologo /DLL  /DEBUG  /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 /NODEFAULTLIB:LIBCI.LIB NODEFAULTLIB:MSVCRT.LIB  /OUT:
"Opt1-Win32\libdtoolconfig_d.dll" Opt1-Win32/dtoolconfig_dtoolconfig.obj Opt1-Win32/dtoolconfig_pydtool.obj ../../src/interrogatedb/Opt1-Win32/interrogatedb_interrogatedb_composite1.obj ../../src/interrogatedb/Opt1-Win32/interrogatedb_interrogatedb_composite2.obj ../../src/dconfig/Opt1-Win32/dconfig_dconfig_composite1.
obj /LIBPATH:"..\dtool\Opt1-Win32" /LIBPATH:"C:\nspr-4.4.1\lib" /LIBPATH:"C:\Python22\libs" /LIBPATH:"C:\Python22\libs" libdtool_d.lib libnspr4.lib
LINK : fatal error LNK1104: cannot open file 'python22_d.lib'
make[1]: *** [Opt1-Win32/libdtoolconfig_d.dll] Error 80
make[1]: Leaving directory `/cygdrive/c/Panda3d-src/dtool/metalibs/dtoolconfig'
make: *** [dtoolconfig] Error 2

I see a python22.lib within the the C:\Python22\libs folder but no python22_d.lib. Any ideas??

Thanks again,

Wigs

etc.cmu.edu/panda3d/forum/vi … .php?t=168