Compilation on SunOS 5.9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation on SunOS 5.9

Mikael Johansson-3

Hello All!

Has anyone compiled the new OpenBabel on a SunOS machine (pre solaris
10) which lacks the scandir system call? Now compilation halts on
dlhandler_unix.cpp as the system doesn't recognize scandir.

Any workaround already in circulation? I guess it should be possible to
just insert the scandir function source code into dlhandler_unix.cpp, but
perhaps a more elegant solution is available?

All help appreciated,
     Mikael J.
     http://www.helsinki.fi/~mpjohans/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Compilation on SunOS 5.9

Geoffrey Hutchison

On Nov 29, 2005, at 5:31 AM, Mikael Johansson wrote:

> Any workaround already in circulation? I guess it should be  
> possible to just insert the scandir function source code into  
> dlhandler_unix.cpp, but perhaps a more elegant solution is available?

Eh. You can convert the scandir calls into similar readdir calls,  
followed by a check to see if the file should be included in the list.

For example:
http://partneradvantage.sun.com/protected/solaris10/adoptionkit/ 
general/scandir.txt
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ 
dnucmg/html/UCMGch10.asp
(see the "Replacing scandir in Interix" section above)

I had forgotten that Solaris doesn't include scandir. I'd be glad to  
take a patch that uses readdir instead.

Cheers,
-Geoff


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Compilation on SunOS 5.9

Mikael Johansson-3

Hello Geoff and All!

On Tue, 29 Nov 2005, Geoffrey Hutchison wrote:

> Eh. You can convert the scandir calls into similar readdir calls, followed by
> a check to see if the file should be included in the list.

The attached diff seems to do the trick. Before incorporating it anywhere
official, please check it; it's been almost a decade since I've even
looked at C, C++ I haven't touched before at all :-)

The code now compiles without complaints and at least manages to convert
easy molecules from this format to that. It doesn't pass the "make check"
though, so something's not right:

Testing Matrix Algebra...
PASS: matrixtest

Testing SMARTS...
expected 11 matches, found 6
error with molecule BIONET_10B-022 ether on pattern [a]
first match: atom #12
FAIL: smartstest

Testing RINGS...
FAIL: ringtest

Testing datatype conversions ...
  DATATYPE: unit cell vectors test passed
PASS: obtest
./../test/cml.sh: srcdir: not found
Usage:  grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [file ...]
grep [-E|-F] [-c|-l|-q] [-bhinsvwx] -e pattern... [-f
pattern_file]...[file...]
grep [-E|-F] [-c|-l|-q] [-bhinsvwx] [-e pattern]... -f pattern_file
[file...]

Testing CML support...
./../test/cml.sh: source: not found
PASS: ../test/cml.sh

Roundtrip test set not found. Skipping test.
SKIP: ../test/test-set.sh
========================================================
2 of 5 tests failed
(1 tests were not run)
Please report to [hidden email]
========================================================


Have a nice day,
     Mikael J.
     http://www.helsinki.fi/~mpjohans/

diff-of-dlhandler_unix.cpp (1K) Download Attachment