CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

fluent udf error while compiling: unknown type name __locale_t

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2013, 03:02
Default fluent udf error while compiling: unknown type name __locale_t
  #1
New Member
 
Aditya Pandare
Join Date: Aug 2012
Location: Pune, India
Posts: 20
Rep Power: 14
aditya.pandare is on a distinguished road
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?
aditya.pandare is offline   Reply With Quote

Old   April 7, 2014, 02:28
Default fluent UDF error
  #2
New Member
 
Allamaprabhu C Y
Join Date: Mar 2011
Location: Bangalore
Posts: 2
Rep Power: 0
allamaprabhu_cy is on a distinguished road
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
allamaprabhu_cy is offline   Reply With Quote

Old   April 12, 2014, 10:46
Default
  #3
New Member
 
Aditya Pandare
Join Date: Aug 2012
Location: Pune, India
Posts: 20
Rep Power: 14
aditya.pandare is on a distinguished road
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.
aditya.pandare is offline   Reply With Quote

Old   April 12, 2014, 15:52
Default
  #4
Senior Member
 
Pay D.
Join Date: Aug 2011
Posts: 166
Blog Entries: 1
Rep Power: 15
pdp.aero is on a distinguished road
Quote:
Originally Posted by aditya.pandare View Post
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.
pdp.aero is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 8 July 1, 2022 07:54
second order schemes marine OpenFOAM 67 April 11, 2022 19:19
Inlet patch problems martyn88 OpenFOAM Running, Solving & CFD 6 April 21, 2017 19:34
LES supersonic free jet martyn88 OpenFOAM 22 April 17, 2015 07:00
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


All times are GMT -4. The time now is 16:34.