LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   hwere can i find sys/dir.h in Solaris 11 Express...? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/hwere-can-i-find-sys-dir-h-in-solaris-11-express-866677/)

Alexvader 03-05-2011 07:41 PM

hwere can i find sys/dir.h in Solaris 11 Express...?
 
Hi

I am trying to compile this piece of code, http://www.dhondt.de/cgx_2.2.all.tar.bz2

and i get this error along the build :

Code:

readFoam.c:7:21: sys/dir.h: No such file or directory
readFoam.c:14:1: warning: "MAXFLOAT" redefined
In file included from ./extUtil.h:15,
                from ./cgx.h:25,
                from readFoam.c:6:
/usr/include/math.h:98:1: warning: this is the location of the previous definition
readFoam.c: In function `readFoam':
readFoam.c:306: error: `DIR' undeclared (first use in this function)
readFoam.c:306: error: (Each undeclared identifier is reported only once
readFoam.c:306: error: for each function it appears in.)
readFoam.c:306: error: `dirp' undeclared (first use in this function)
readFoam.c:306: error: `dirp1' undeclared (first use in this function)
readFoam.c:306: warning: left-hand operand of comma expression has no effect
readFoam.c:742: warning: implicit declaration of function `opendir'
readFoam.c:744: warning: implicit declaration of function `readdir'
readFoam.c:744: warning: assignment makes pointer from integer without a cast
readFoam.c:751: error: dereferencing pointer to incomplete type
readFoam.c:755: warning: assignment makes pointer from integer without a cast
readFoam.c:758: error: dereferencing pointer to incomplete type
readFoam.c:758: error: dereferencing pointer to incomplete type
readFoam.c:764: warning: implicit declaration of function `closedir'
readFoam.c:782: warning: assignment makes pointer from integer without a cast
readFoam.c:786: error: dereferencing pointer to incomplete type
readFoam.c:788: error: dereferencing pointer to incomplete type
readFoam.c:791: error: dereferencing pointer to incomplete type
readFoam.c:903: warning: assignment makes pointer from integer without a cast
readFoam.c:906: error: dereferencing pointer to incomplete type
readFoam.c:908: error: dereferencing pointer to incomplete type
readFoam.c:911: error: dereferencing pointer to incomplete type
readFoam.c:306: warning: statement with no effect
make: *** [readFoam.o] Error 1

still

Code:

alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ ls /usr/include | grep dir
dirent.h
netdir.h
nss_netdir.h
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ ls /usr/include | grep dir
dirent.h
netdir.h
nss_netdir.h
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ ls /opt/csw/usr/include | grep dir
ls: cannot access /opt/csw/usr/include: No such file or directory
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ ls /opt/csw/gcc4/include | grep dir
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ ls /opt/csw/include | grep dir
H5FDdirect.h
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ find / -name sys.h
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$ sudo find / -name sys.h
Password:
alex@solaris:~/Desktop/pkg/CalculiX/cgx_2.2/src$

What can i do about this...?

BRGDS

Alex

AlucardZero 03-05-2011 07:50 PM

All I have, from Google and your previous post here on this same subject is that it's probably dirent.h on Solaris.

Alexvader 03-06-2011 04:17 PM

Quote:

Originally Posted by AlucardZero (Post 4280193)
All I have, from Google and your previous post here on this same subject is that it's probably dirent.h on Solaris.

WHOAAAA :D

I did it :)

I grepped for dir.h in my source tree and changed to dirent... this would still throw errors in compile time... so i changed #include <sys/dir.h> for #include <dir.h> in my source tree, and dropped a dir.h inside

Code:

/*
 * Copyright (c) 1982, 1986, 1989, 1993
 *    The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    This product includes software developed by the University of
 *    California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *    @(#)dir.h    8.2 (Berkeley) 1/4/94
 * $FreeBSD: src/sys/sys/dir.h,v 1.6 1999/08/28 00:51:39 peter Exp $
 */

#ifndef _SYS_DIR_H_
#define    _SYS_DIR_H_

#if __GNUC__
#warning "The information in this file should be obtained from <dirent.h>"
#warning "and is provided solely (and temporarily) for backward compatibility."
#endif

#include <dirent.h>

/*
 * Backwards compatibility.
 */
#define    direct        dirent
#define    DIRSIZ(dp)    _GENERIC_DIRSIZ(dp)

#endif /* !_SYS_DIR_H_ */


...now, ain't open source a wonderful thing... ? :)

Now, will try to build BrlCad, Blender, Code Aster and OpenFoam.

Alexvader 03-07-2011 07:15 PM

I have Packed those binaries i built with the sources from here, http://www.dhondt.de/, and posted them in their yahoo group, in the files section... should someone be interested in using these in Solaris...

Grace builds fine in Solaris also... http://plasma-gate.weizmann.ac.il/Grace/

Still have to build :

Brl-Cad, Code_aster, Blender, OpenFOAM, AVL, XFoil, gmsh, netgen, and , last but not the least, the broadcom driver using Ndiswrapper for 64bits

... I have 3 VMs running solaris :

OpenSolaris 0906
OpenIndiana
Solaris 11 Express

So far i have only built this in the OpenSolaris 0906, using ndis-1.2.5 from http://hub.opensolaris.org/bin/view/...up+laptop/ndis

seems that this is a bit version dependent... same thing which works under OpenSolaris does not work under Solaris 11 Express or OpenIndiana... :(

Only if i build these stuff may i consider the possibility of shifting one of my machines from Debian to Solaris...

ZFS and snapshots are unique features allright... but i need my tools to work...

BTW, does Solaris has SciPy, and NumPy, and SciTools...?

BRGDS

Alex

fbsduser 03-08-2011 01:44 AM

It should work in openindiana since it's not too changed from opensolaris yet.


All times are GMT -5. The time now is 01:32 PM.