Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thing with Standalone/ tree in builds needs to be documented #44

Closed
mcclure opened this issue Nov 15, 2011 · 4 comments
Closed

Thing with Standalone/ tree in builds needs to be documented #44

mcclure opened this issue Nov 15, 2011 · 4 comments

Comments

@mcclure
Copy link
Contributor

mcclure commented Nov 15, 2011

EDIT: I changed the title based on ivansafrin's post below

I am on OS X Snow Leopard with XCode 3. I have a complete build of Polycode that I made by running the standard cmake instructions against c3c534c but adding BUILD_POLYCODE_PLAYER=1 (or whatever it is?) at one step. Note, since the last time I did a clean build I have several times up'd the polycode repository and rebuilt without cleaning; don't know if that's potentially significant.

If I go into the new LUA "2DPhysics_Basic" directory and run:

../../../Release/Darwin/Framework/Tools/polybuild --config=2DPhysics_Basic.xml --out=Test.polyapp

polybuild segmentation faults:

andis-macbook:2DPhysics_Basic mcc$ ../../../Release/Darwin/Framework/Tools/polybuild --config=2DPhysics_Basic.xml --out=Test.polyapp
Polycode build tool v0.8.2
Reading config file from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_Basic/2DPhysics_Basic.xml
Reading xml from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_Basic/2DPhysics_Basic.xml
OK!
Entry point: 2DPhysics_Basic.lua
Width: 640
Height: 480
Anti-aliasing level: 0
Background color: 0.250000 0.250000 0.250000
Packaging 2DPhysics_Basic.lua as 2DPhysics_Basic.lua
Adding module: Physics2D
Path:/Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_Basic/../../../Release/Darwin/Framework/Modules/Physics2D/API
Segmentation fault

It creates a Test.polyapp file, but it is not a valid zip file. unzip emits the error "End-of-central-directory signature not found" and PolycodePlayer, when I try to open the polyapp in there, claims it cannot find the xml file. This is 100% reproducible for me.

@ivansafrin
Copy link
Owner

Just a side note: rebuilding cmake stuff without cleaning is always a bad idea. I would recommend removing the build directory and re-running cmake every time there are significant pull updates just to be on the safe side.

Your issue has to do with the fact that you need to be using polybuild in the Standalone folder structure (I'm sorry this is completely undocumented right now!). There is a folder now called Standalone in the Polycode source tree. You need to run cmake in that folder (the usual mkdir Build, cd Build, cmake .. business) after you build and install the main Polycode project. This will create a Release/Darwin/Standalone folder and populate it with the tools as they're supposed to be packaged. Use the polybuild in the Bin folder of that structure, rather than the Framework one.

@mcclure
Copy link
Contributor Author

mcclure commented Nov 16, 2011

"I would recommend removing the build directory and re-running cmake every time there are significant pull updates just to be on the safe side."

Would you recommend also deleting the Release/ directory in this case?

"you need to be using polybuild in the Standalone folder structure (I'm sorry this is completely undocumented right now!)."

Great, thanks, although

  1. I'd still consider that a documentation bug, if nothing else; and
  2. I did as you said-- I deleted all the Build folders plus Release, I built again and I built and installed Standalone. After this I ran the polybuild again, this time out of Standalone/Bin. I got the same results as before:

andis-macbook:2DPhysics_CollisionOnly mcc$ ../../../Release/Darwin/Standalone/Bin/polybuild --config=2DPhysics_CollisionOnly.xml --out=../Build/2DPhysics_CollisionOnly.polyapp
Polycode build tool v0.8.2
Reading config file from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_CollisionOnly/2DPhysics_CollisionOnly.xml
Reading xml from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_CollisionOnly/2DPhysics_CollisionOnly.xml
OK!
Entry point: 2DPhysics_CollisionOnly.lua
Width: 640
Height: 480
Anti-aliasing level: 0
Background color: 0.250000 0.250000 0.250000
Packaging 2DPhysics_CollisionOnly.lua as 2DPhysics_CollisionOnly.lua
Adding module: Physics2D
Path:/Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_CollisionOnly/../../../Release/Darwin/Standalone/Modules/Physics2D/API
Segmentation fault

...however, then things got REALLY weird!

I figured, probably I should run this in gdb so I can give Ivan a better idea of what's happening. When I ran the exact same polybuild in gdb, it completed without crashing:

andis-macbook:2DPhysics_CollisionOnly mcc$ gdb ../../../Release/Darwin/Standalone/Bin/polybuild
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........ done

(gdb) run --config=2DPhysics_CollisionOnly.xml --out=../Build/2DPhysics_CollisionOnly.polyapp
Starting program: /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Bin/polybuild --config=2DPhysics_CollisionOnly.xml --out=../Build/2DPhysics_CollisionOnly.polyapp
Reading symbols for shared libraries .+++++++.................................................................................. done
Polycode build tool v0.8.2
Reading config file from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_CollisionOnly/2DPhysics_CollisionOnly.xml
Reading xml from /Users/mcc/work/p/Polycode/Examples/Lua/2DPhysics_CollisionOnly/2DPhysics_CollisionOnly.xml
OK!
Entry point: 2DPhysics_CollisionOnly.lua
Width: 640
Height: 480
Anti-aliasing level: 0
Background color: 0.250000 0.250000 0.250000
Packaging 2DPhysics_CollisionOnly.lua as 2DPhysics_CollisionOnly.lua
Adding module: Physics2D
Path:/Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API/Physics2D/PhysicsJoint.lua as Physics2D/PhysicsJoint.lua
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API/Physics2D/PhysicsScreen.lua as Physics2D/PhysicsScreen.lua
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API/Physics2D/PhysicsScreenEntity.lua as Physics2D/PhysicsScreenEntity.lua
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API/Physics2D/PhysicsScreenEvent.lua as Physics2D/PhysicsScreenEvent.lua
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/API/Physics2D.lua as Physics2D.lua
Packaging /Users/mcc/work/p/Polycode/Release/Darwin/Standalone/Modules/Physics2D/Lib/osx/Physics2D.dylib as __lib/osx/Physics2D.dylib

Program exited normally.

...and the generated polyapp was 901k (unlike the 4k ones being spit out on segfault) and actually worked totally fine.

Any idea what could be happening here? :(

EDIT: Also full disclosure I'm technically building out of tip from my bitbucket repo https://bitbucket.org/runhello/polycode/overview but, this is just top of tree from github merged with my pull request.

@mcclure
Copy link
Contributor Author

mcclure commented Nov 20, 2011

Okay, please disregard the previous post. I massaged my build script some and now I do not get the crash any longer.

I'm going to suggest leaving this issue open until the process of using Standalone/ for polybuild is clearly documented however.

@ivansafrin
Copy link
Owner

Added the Standalone build step to build documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants