CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   fluent udf error while compiling: unknown type name __locale_t (http://www.cfd-online.com/Forums/fluent-udf/111566-fluent-udf-error-while-compiling-unknown-type-name-__locale_t.html)

aditya.pandare January 10, 2013 03:02

fluent udf error while compiling: unknown type name __locale_t
 
I am trying to compile a simple "density variation with pressure" udf in Fluent 13 @ ubuntu 32bit
I get the following errors in the log file: (I have boldfaced the lines with error)

# building library in lnx86/2ddp
make[1]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
# Generating udf_names.c because of makefile density_cell.c
make[2]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -m32 -O " "LDFLAGS=-shared -lm -m elf_i386"
make[3]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
# Compiling udf_names.o because of udf_names.c
cc -fpic -shared -ansi -Wall -m32 -O -I/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/ansys_inc/v130/fluent/fluent13.0.0/src -I/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c udf_names.c
In file included from /usr/include/pthread.h:26:0,
from /ansys_inc/v130/fluent/fluent13.0.0/multiport/src/mpthreads.h:13,
from /ansys_inc/v130/fluent/fluent13.0.0/src/global.h:240,
from /ansys_inc/v130/fluent/fluent13.0.0/src/udf.h:20,
from udf_names.c:3:
/usr/include/time.h:226:5: error: unknown type name __locale_t
make[3]: *** [udf_names.o] Error 1
# Compiling density_cell.o because of density_cell.c
cc -fpic -shared -ansi -Wall -m32 -O -I/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/ansys_inc/v130/fluent/fluent13.0.0/src -I/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c density_cell.c
In file included from /usr/include/pthread.h:26:0,
from /ansys_inc/v130/fluent/fluent13.0.0/multiport/src/mpthreads.h:13,
from /ansys_inc/v130/fluent/fluent13.0.0/src/global.h:240,
from /ansys_inc/v130/fluent/fluent13.0.0/src/udf.h:20,
from density_cell.c:1:
/usr/include/time.h:226:5: error: unknown type name __locale_t
make[3]: *** [density_cell.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.

make[3]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make[2]: *** [lnx86] Error 2
make[2]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'


could I get some help with this?

allamaprabhu_cy April 7, 2014 01:28

fluent UDF error
 
Hi Aditya,
I am facing the same problem which you posted in 2013. Please let me know how you could solve it. I am getting the following error:
/usr/include/time.h:226:5: error: unknown type name __locale_t

Eagerly awaiting your reply.
regards,
Allamaprabhu

aditya.pandare April 12, 2014 09:46

1 Attachment(s)
Hi,
I do not exactly remember how I had solved this issue. But I do remember that this PDF helped me a lot. I have attached it to this post. See if it helps you.

pdp.aero April 12, 2014 14:52

Quote:

Originally Posted by aditya.pandare (Post 401104)
I am trying to compile a simple "density variation with pressure" udf in Fluent 13 @ ubuntu 32bit
I get the following errors in the log file: (I have boldfaced the lines with error)

# building library in lnx86/2ddp
make[1]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
# Generating udf_names.c because of makefile density_cell.c
make[2]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -m32 -O " "LDFLAGS=-shared -lm -m elf_i386"
make[3]: Entering directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
# Compiling udf_names.o because of udf_names.c
cc -fpic -shared -ansi -Wall -m32 -O -I/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/ansys_inc/v130/fluent/fluent13.0.0/src -I/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c udf_names.c
In file included from /usr/include/pthread.h:26:0,
from /ansys_inc/v130/fluent/fluent13.0.0/multiport/src/mpthreads.h:13,
from /ansys_inc/v130/fluent/fluent13.0.0/src/global.h:240,
from /ansys_inc/v130/fluent/fluent13.0.0/src/udf.h:20,
from udf_names.c:3:
/usr/include/time.h:226:5: error: unknown type name ‘__locale_t’
make[3]: *** [udf_names.o] Error 1
# Compiling density_cell.o because of density_cell.c
cc -fpic -shared -ansi -Wall -m32 -O -I/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/ansys_inc/v130/fluent/fluent13.0.0/src -I/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c density_cell.c
In file included from /usr/include/pthread.h:26:0,
from /ansys_inc/v130/fluent/fluent13.0.0/multiport/src/mpthreads.h:13,
from /ansys_inc/v130/fluent/fluent13.0.0/src/global.h:240,
from /ansys_inc/v130/fluent/fluent13.0.0/src/udf.h:20,
from density_cell.c:1:
/usr/include/time.h:226:5: error: unknown type name ‘__locale_t’
make[3]: *** [density_cell.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.

make[3]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make[2]: *** [lnx86] Error 2
make[2]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/ifmg/AdityaKP/orifice/95k-axisym/cavitation-trial/libudf/lnx86/2ddp'


could I get some help with this?

The following procedure is for 64 bit Window OS. First, install Visual C++ 6, check the environment variable at the end of the installation. Then, install visual studio 2010. Finally compile you UDF. For 32 bit OS simply just use Visual C++ 6.
However, for 32 bit Linux OS you need to install C++ compiler, I am not sure that gcc/g++ will work in this case, but I am sure that you need to have C++ compiler which links correctly with your fluent for using its external compiler.
Besides, please note to your UDF capability in case you are running in parallel.


All times are GMT -4. The time now is 17:21.