Skip to content

Instantly share code, notes, and snippets.

@potpath
Created September 4, 2014 05:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save potpath/03a96d3321e719fbae1c to your computer and use it in GitHub Desktop.
Save potpath/03a96d3321e719fbae1c to your computer and use it in GitHub Desktop.
patch to make GraspIt! 2.2 compilable in Ubuntu 14.04
diff -rupN Graspit/graspit-lib-LINUX.pro GraspitNew/graspit-lib-LINUX.pro
--- Graspit/graspit-lib-LINUX.pro 2012-04-21 01:03:59.000000000 +0700
+++ GraspitNew/graspit-lib-LINUX.pro 2014-09-04 12:06:38.646600227 +0700
@@ -21,7 +21,7 @@ LIBS += -lqhull
LIBS += -lSoQt -lCoin
#add utility libraries
-LIBS += -lGL -lpthread
+LIBS += -lGL -lpthread -ldl
MOC_DIR = .moc
OBJECTS_DIR = .obj
diff -rupN Graspit/src/ivmgr.cpp GraspitNew/src/ivmgr.cpp
--- Graspit/src/ivmgr.cpp 2012-03-29 06:33:56.000000000 +0700
+++ GraspitNew/src/ivmgr.cpp 2014-09-04 12:04:06.346596149 +0700
@@ -1540,7 +1540,7 @@ IVmgr::saveImage(QString filename)
#endif
int numtypes = myRenderer->getNumWriteFiletypes();
- SbList<SbName> extList;
+ SbPList extList;
SbString fullname;
SbString desc;
for (int i=0;i<numtypes;i++) {
@kdmojdehi
Copy link

is anyone else wondering how this patch should be applied? (and why is there an open for statement in the last line?)

@potpath
Copy link
Author

potpath commented May 20, 2015

How to apply graspit.patch file

  1. Put graspit.patch in root directory of Graspit 2.2.
  2. cd to root directory of Graspit 2.2.
  3. patch -p1 < graspit.patch

An open for statement is just a context of the different line when creating patch.
FYI, see http://jungels.net/articles/diff-patch-ten-minutes.html.

@emigmo
Copy link

emigmo commented Apr 22, 2016

why that:
" for (int i=0;i<numtypes;i++) { "
at the last line ?

@jvarley
Copy link

jvarley commented May 27, 2016

This is out of date. GraspIt! runs fine with 14.04
https://github.com/graspit-simulator/graspit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment