summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-06-01 00:48:39 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-06-01 00:48:39 +0530
commit22ec209b97c2ebf015be46d6b1d07bb123390656 (patch)
tree01628c382e49d09aa3068f4c86fa59260ea6cdac
parentd98540f2b801be8b66d54a81f47517251899644c (diff)
Publish deploy 2020-06-01 00:48
-rw-r--r--assets/posts/open-babel/s2.jpgbin0 -> 132781 bytes
-rw-r--r--assets/posts/open-babel/s3.jpgbin0 -> 314900 bytes
-rw-r--r--feed.rss6
-rw-r--r--posts/2020-05-31-compiling-open-babel-on-ios/index.html4
4 files changed, 5 insertions, 5 deletions
diff --git a/assets/posts/open-babel/s2.jpg b/assets/posts/open-babel/s2.jpg
new file mode 100644
index 0000000..7ece652
--- /dev/null
+++ b/assets/posts/open-babel/s2.jpg
Binary files differ
diff --git a/assets/posts/open-babel/s3.jpg b/assets/posts/open-babel/s3.jpg
new file mode 100644
index 0000000..5803e97
--- /dev/null
+++ b/assets/posts/open-babel/s3.jpg
Binary files differ
diff --git a/feed.rss b/feed.rss
index 4e5aa1e..a8f147d 100644
--- a/feed.rss
+++ b/feed.rss
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content"><channel><title>Navan Chauhan</title><description>Welcome to my personal fragment of the internet. Majority of the posts should be complete.</description><link>https://navanchauhan.github.io/</link><language>en</language><lastBuildDate>Mon, 1 Jun 2020 00:41:37 +0530</lastBuildDate><pubDate>Mon, 1 Jun 2020 00:41:37 +0530</pubDate><ttl>250</ttl><atom:link href="https://navanchauhan.github.io/feed.rss" rel="self" type="application/rss+xml"/><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-05-31-compiling-open-babel-on-ios</guid><title>Compiling Open Babel on iOS</title><description>Compiling Open Babel on iOS</description><link>https://navanchauhan.github.io/posts/2020-05-31-compiling-open-babel-on-ios</link><pubDate>Sun, 31 May 2020 11:30:00 +0530</pubDate><content:encoded><![CDATA[<h1>Compiling Open Babel on iOS</h1><p>Due to the fact that my summer vacations started today, I had the brilliant idea of trying to run open babel on my iPad. To give a little background, I had tried to compile AutoDock Vina using a cross-compiler but I had miserably failed.</p><p>I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.</p><h2>But Why?</h2><p>Well, just because I can. This is literally the only reason I tried compiling it and also partially because in the long run I want to compile AutoDock Vina so I can do Molecular Docking on the go.</p><h2>Let's Go!</h2><p>How hard can it be to compile open babel right? It is just a simple software with clear and concise build instructions. I just need to use <code>cmake</code> to build and the <code>make</code> to install.</p><p>It is 11 AM in the morning. I install <code>clang, cmake and make</code> from the Sam Bingner's repository, fired up ssh, downloaded the source code and ran the build command.`clang</p><p><em>Fail No. 1</em></p><p>I couldn't even get cmake to run, I did a little digging arond StackOverflow and founf that I needed the iOS SDK, sure no problem. I waited for Xcode to update and transfered the <code>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk</code> to <code>/var/sdks/</code> on my iPad</p><p>Them I told cmake that this is the location for my SDK 😠. Succesful! Now I just needed to use make.</p><p><em>Fail No. 2</em></p><p>It was giving the error that thread-local-storage was not supported on this device.</p><pre><code><div class="highlight"><span></span><span class="o">[</span> <span class="m">0</span>%<span class="o">]</span> Building CXX object src/CMakeFiles/openbabel.dir/alias.cpp.o
+<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content"><channel><title>Navan Chauhan</title><description>Welcome to my personal fragment of the internet. Majority of the posts should be complete.</description><link>https://navanchauhan.github.io/</link><language>en</language><lastBuildDate>Mon, 1 Jun 2020 00:48:18 +0530</lastBuildDate><pubDate>Mon, 1 Jun 2020 00:48:18 +0530</pubDate><ttl>250</ttl><atom:link href="https://navanchauhan.github.io/feed.rss" rel="self" type="application/rss+xml"/><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-05-31-compiling-open-babel-on-ios</guid><title>Compiling Open Babel on iOS</title><description>Compiling Open Babel on iOS</description><link>https://navanchauhan.github.io/posts/2020-05-31-compiling-open-babel-on-ios</link><pubDate>Sun, 31 May 2020 11:30:00 +0530</pubDate><content:encoded><![CDATA[<h1>Compiling Open Babel on iOS</h1><p>Due to the fact that my summer vacations started today, I had the brilliant idea of trying to run open babel on my iPad. To give a little background, I had tried to compile AutoDock Vina using a cross-compiler but I had miserably failed.</p><p>I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.</p><h2>But Why?</h2><p>Well, just because I can. This is literally the only reason I tried compiling it and also partially because in the long run I want to compile AutoDock Vina so I can do Molecular Docking on the go.</p><h2>Let's Go!</h2><p>How hard can it be to compile open babel right? It is just a simple software with clear and concise build instructions. I just need to use <code>cmake</code> to build and the <code>make</code> to install.</p><p>It is 11 AM in the morning. I install <code>clang, cmake and make</code> from the Sam Bingner's repository, fired up ssh, downloaded the source code and ran the build command.`clang</p><h3>Fail No. 1</h3><p>I couldn't even get cmake to run, I did a little digging arond StackOverflow and founf that I needed the iOS SDK, sure no problem. I waited for Xcode to update and transfered the <code>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk</code> to <code>/var/sdks/</code> on my iPad</p><p>Them I told cmake that this is the location for my SDK 😠. Succesful! Now I just needed to use make.</p><h3>Fail No. 2</h3><p>It was giving the error that thread-local-storage was not supported on this device.</p><pre><code><div class="highlight"><span></span><span class="o">[</span> <span class="m">0</span>%<span class="o">]</span> Building CXX object src/CMakeFiles/openbabel.dir/alias.cpp.o
<span class="o">[</span> <span class="m">1</span>%<span class="o">]</span> Building CXX object src/CMakeFiles/openbabel.dir/atom.cpp.o
In file included from /var/root/obabel/ob-src/src/atom.cpp:28:
In file included from /var/root/obabel/ob-src/include/openbabel/ring.h:29:
@@ -38,9 +38,9 @@ THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper<span class="p">;</span>
make<span class="o">[</span><span class="m">2</span><span class="o">]</span>: *** <span class="o">[</span>src/CMakeFiles/openbabel.dir/build.make:76: src/CMakeFiles/openbabel.dir/atom.cpp.o<span class="o">]</span> Error <span class="m">1</span>
make<span class="o">[</span><span class="m">1</span><span class="o">]</span>: *** <span class="o">[</span>CMakeFiles/Makefile2:1085: src/CMakeFiles/openbabel.dir/all<span class="o">]</span> Error <span class="m">2</span>
make: *** <span class="o">[</span>Makefile:129: all<span class="o">]</span> Error <span class="m">2</span>
-</div></code></pre><p>Strange but it is alright, there is nothing that hasn't been answered on the internet.</p><p>I did a little digging around and could not find a solution 😔</p><p>As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.</p><img src="https://navanchauhan.github.io//assets/posts/open-babel/s1.png" alt=""Open-Babel running on my iPad""/><h2>Packaging as a deb</h2><p>This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.</p><h2>Moment of Truth</h2><p>So I airdropped the .deb to my phone and tried installing it, the installation was succesful but when I tried <code>obabel</code> it just abborted with syscall 9</p><p>Turns out because I had created an install target of a seprate folder while compiling, the binaries were refferencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: <code>install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib</code> for all the executables and then signed them using jtool</p><p>I then installed it and everything went smoothly, I even ran <code>obabel</code> and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.</p><p>Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird. So I just copied the entire build folder from my iPad to my phone and tried runnig it. Oops, Apple Sandbox Error, Oh no!</p><p>I spent 2 hours around this problem, only to see the documentation and relaise I hadn't setup the environment variable 🤦‍♂️</p><h2>The Final Fix ( For Now )</h2><pre><code><div class="highlight"><span></span><span class="nb">export</span> <span class="nv">BABEL_DATADIR</span><span class="o">=</span><span class="s2">&quot;/usr/share/openbabel/3.1.0&quot;</span>
+</div></code></pre><p>Strange but it is alright, there is nothing that hasn't been answered on the internet.</p><p>I did a little digging around and could not find a solution 😔</p><p>As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.</p><img src="https://navanchauhan.github.io//assets/posts/open-babel/s1.png" alt=""Open-Babel running on my iPad""/><h2>Packaging as a deb</h2><p>This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.</p><h2>Moment of Truth</h2><p>So I airdropped the .deb to my phone and tried installing it, the installation was succesful but when I tried <code>obabel</code> it just abborted.</p><img src="https://navanchauhan.github.io//assets/posts/open-babel/s2.jpg" alt=""Open Babel crashing""/><p>Turns out because I had created an install target of a seprate folder while compiling, the binaries were refferencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: <code>install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib</code> for all the executables and then signed them using jtool</p><p>I then installed it and everything went smoothly, I even ran <code>obabel</code> and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.</p><p>Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird.</p><img src="https://navanchauhan.github.io//assets/posts/open-babel/s3.jpg" alt=""Open Babel Plugin Error""/><p>So I just copied the entire build folder from my iPad to my phone and tried runnig it. Oops, Apple Sandbox Error, Oh no!</p><p>I spent 2 hours around this problem, only to see the documentation and relaise I hadn't setup the environment variable 🤦‍♂️</p><h2>The Final Fix ( For Now )</h2><pre><code><div class="highlight"><span></span><span class="nb">export</span> <span class="nv">BABEL_DATADIR</span><span class="o">=</span><span class="s2">&quot;/usr/share/openbabel/3.1.0&quot;</span>
<span class="nb">export</span> <span class="nv">BABEL_LIBDIR</span><span class="o">=</span><span class="s2">&quot;/usr/lib/openbabel/3.1.0&quot;</span>
-</div></code></pre><p>This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.</p><p>Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.</p><p>Hopefully, I add some more screenshots to this post.</p>]]></content:encoded></item><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS</guid><title>Fixing X11 Error on macOS Catalina for AmberTools 18/19</title><description>Fixing Could not find the X11 libraries; you may need to edit config.h, AmberTools macOS Catalina</description><link>https://navanchauhan.github.io/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS</link><pubDate>Mon, 13 Apr 2020 11:41:00 +0530</pubDate><content:encoded><![CDATA[<h1>Fixing X11 Error on macOS Catalina for AmberTools 18/19</h1><p>I was trying to install AmberTools on my macOS Catalina Installation. Running <code>./configure -macAccelerate clang</code> gave me an error that it could not find X11 libraries, even though <code>locate libXt</code> showed that my installation was correct.</p><p>Error:</p><pre><code><div class="highlight"><span></span>Could not find the X11 libraries<span class="p">;</span> you may need to edit config.h
+</div></code></pre><p>This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.</p><p>Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.</p><p>Hopefully, I add some more screenshots to this post.</p><p>Edit 1: Added Screenshots, had to replicate the errors.</p>]]></content:encoded></item><item><guid isPermaLink="true">https://navanchauhan.github.io/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS</guid><title>Fixing X11 Error on macOS Catalina for AmberTools 18/19</title><description>Fixing Could not find the X11 libraries; you may need to edit config.h, AmberTools macOS Catalina</description><link>https://navanchauhan.github.io/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS</link><pubDate>Mon, 13 Apr 2020 11:41:00 +0530</pubDate><content:encoded><![CDATA[<h1>Fixing X11 Error on macOS Catalina for AmberTools 18/19</h1><p>I was trying to install AmberTools on my macOS Catalina Installation. Running <code>./configure -macAccelerate clang</code> gave me an error that it could not find X11 libraries, even though <code>locate libXt</code> showed that my installation was correct.</p><p>Error:</p><pre><code><div class="highlight"><span></span>Could not find the X11 libraries<span class="p">;</span> you may need to edit config.h
to <span class="nb">set</span> the XHOME and XLIBS variables.
Error: The X11 libraries are not in the usual location !
To search <span class="k">for</span> them try the command: locate libXt
diff --git a/posts/2020-05-31-compiling-open-babel-on-ios/index.html b/posts/2020-05-31-compiling-open-babel-on-ios/index.html
index be8f4fc..5ead530 100644
--- a/posts/2020-05-31-compiling-open-babel-on-ios/index.html
+++ b/posts/2020-05-31-compiling-open-babel-on-ios/index.html
@@ -38,6 +38,6 @@ THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper<span class="p">;</span>
make<span class="o">[</span><span class="m">2</span><span class="o">]</span>: *** <span class="o">[</span>src/CMakeFiles/openbabel.dir/build.make:76: src/CMakeFiles/openbabel.dir/atom.cpp.o<span class="o">]</span> Error <span class="m">1</span>
make<span class="o">[</span><span class="m">1</span><span class="o">]</span>: *** <span class="o">[</span>CMakeFiles/Makefile2:1085: src/CMakeFiles/openbabel.dir/all<span class="o">]</span> Error <span class="m">2</span>
make: *** <span class="o">[</span>Makefile:129: all<span class="o">]</span> Error <span class="m">2</span>
-</div></code></pre><p>Strange but it is alright, there is nothing that hasn't been answered on the internet.</p><p>I did a little digging around and could not find a solution 😔</p><p>As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.</p><img src="/assets/posts/open-babel/s1.png" alt=""Open-Babel running on my iPad""/><h2>Packaging as a deb</h2><p>This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.</p><h2>Moment of Truth</h2><p>So I airdropped the .deb to my phone and tried installing it, the installation was succesful but when I tried <code>obabel</code> it just abborted with syscall 9</p><p>Turns out because I had created an install target of a seprate folder while compiling, the binaries were refferencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: <code>install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib</code> for all the executables and then signed them using jtool</p><p>I then installed it and everything went smoothly, I even ran <code>obabel</code> and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.</p><p>Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird. So I just copied the entire build folder from my iPad to my phone and tried runnig it. Oops, Apple Sandbox Error, Oh no!</p><p>I spent 2 hours around this problem, only to see the documentation and relaise I hadn't setup the environment variable 🤦‍♂️</p><h2>The Final Fix ( For Now )</h2><pre><code><div class="highlight"><span></span><span class="nb">export</span> <span class="nv">BABEL_DATADIR</span><span class="o">=</span><span class="s2">&quot;/usr/share/openbabel/3.1.0&quot;</span>
+</div></code></pre><p>Strange but it is alright, there is nothing that hasn't been answered on the internet.</p><p>I did a little digging around and could not find a solution 😔</p><p>As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.</p><img src="/assets/posts/open-babel/s1.png" alt=""Open-Babel running on my iPad""/><h2>Packaging as a deb</h2><p>This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.</p><h2>Moment of Truth</h2><p>So I airdropped the .deb to my phone and tried installing it, the installation was succesful but when I tried <code>obabel</code> it just abborted.</p><img src="/assets/posts/open-babel/s2.jpg" alt=""Open Babel crashing""/><p>Turns out because I had created an install target of a seprate folder while compiling, the binaries were refferencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: <code>install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib</code> for all the executables and then signed them using jtool</p><p>I then installed it and everything went smoothly, I even ran <code>obabel</code> and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.</p><p>Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird.</p><img src="/assets/posts/open-babel/s3.jpg" alt=""Open Babel Plugin Error""/><p>So I just copied the entire build folder from my iPad to my phone and tried runnig it. Oops, Apple Sandbox Error, Oh no!</p><p>I spent 2 hours around this problem, only to see the documentation and relaise I hadn't setup the environment variable 🤦‍♂️</p><h2>The Final Fix ( For Now )</h2><pre><code><div class="highlight"><span></span><span class="nb">export</span> <span class="nv">BABEL_DATADIR</span><span class="o">=</span><span class="s2">&quot;/usr/share/openbabel/3.1.0&quot;</span>
<span class="nb">export</span> <span class="nv">BABEL_LIBDIR</span><span class="o">=</span><span class="s2">&quot;/usr/lib/openbabel/3.1.0&quot;</span>
-</div></code></pre><p>This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.</p><p>Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.</p><p>Hopefully, I add some more screenshots to this post.</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/ios">iOS</a></li><li><a href="/tags/jailbreak">jailbreak</a></li><li><a href="/tags/cheminformatic">Cheminformatic</a></li></ul><div id="disqus_thread"></div><script src="/assets/disqus.js"></script><noscript>Please enable JavaScript to view the comments</noscript></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html> \ No newline at end of file
+</div></code></pre><p>This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.</p><p>Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.</p><p>Hopefully, I add some more screenshots to this post.</p><p>Edit 1: Added Screenshots, had to replicate the errors.</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/ios">iOS</a></li><li><a href="/tags/jailbreak">jailbreak</a></li><li><a href="/tags/cheminformatic">Cheminformatic</a></li></ul><div id="disqus_thread"></div><script src="/assets/disqus.js"></script><noscript>Please enable JavaScript to view the comments</noscript></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html> \ No newline at end of file