Welcome! Log In Create A New Profile

Advanced

Compile - undeclared identifier 'fseeko64'; did you mean 'fseeko'?

Posted by ryan.armstroryan.armstro  
Compile - undeclared identifier 'fseeko64'; did you mean 'fseeko'?
September 14, 2016 03:05AM
Hi,

I'm trying to compile the cylinder2d showcase and get the following error after running make.

s/palabos-v1.5r1/externalLibraries /Applications/palabos-v1.5r1/src/io/multiBlockReader2D.cpp
/Applications/palabos-v1.5r1/src/io/mpiParallelIO.cpp:119:32: error: use of undeclared identifier 'fseeko64'; did you mean 'fseeko'?
int fSeekVal = fseeko64(fp, nextOffset, SEEK_SET);
^~~~~~~~
fseeko
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/stdio.h:420:6: note: 'fseeko' declared here
int fseeko(FILE * __stream, off_t __offset, int __whence);
^
/Applications/palabos-v1.5r1/src/io/mpiParallelIO.cpp:232:32: error: use of undeclared identifier 'fseeko64'; did you mean 'fseeko'?
int fSeekVal = fseeko64(fp, nextOffset, SEEK_SET);
^~~~~~~~
fseeko
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/stdio.h:420:6: note: 'fseeko' declared here
int fseeko(FILE * __stream, off_t __offset, int __whence);
^
2 errors generated.
scons: *** [/Applications/palabos-v1.5r1/src/io/mpiParallelIO.o] Error 1
/Applications/palabos-v1.5r1/src/io/multiBlockReader2D.cpp:360:9: error: use of undeclared identifier 'fseeko64'; did you mean 'fseeko'?
fseeko64(fp, pos, SEEK_SET);
^~~~~~~~
fseeko
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/stdio.h:420:6: note: 'fseeko' declared here
int fseeko(FILE * __stream, off_t __offset, int __whence);
^
1 error generated.
scons: *** [/Applications/palabos-v1.5r1/src/io/multiBlockReader2D.o] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2

Details:
Mac OS El Capitan version 10.11.6
Palabos-v1.5r1
Xcode v8.0

Here is the make file

##########################################################################
## Makefile.
##
## The present Makefile is a pure configuration file, in which
## you can select compilation options. Compilation dependencies
## are managed automatically through the Python library SConstruct.
##
## If you don't have Python, or if compilation doesn't work for other
## reasons, consult the Palabos user's guide for instructions on manual
## compilation.
##########################################################################

# USE: multiple arguments are separated by spaces.
# For example: projectFiles = file1.cpp file2.cpp
# optimFlags = -O -finline-functions

#define USE_FILE32API

# Leading directory of the Palabos source code
palabosRoot = ../../..
# Name of source files in current directory to compile and link with Palabos
projectFiles = cylinder2d.cpp

# Set optimization flags on/off
optimize = true
# Set debug mode and debug flags on/off
debug = false
# Set profiling flags on/off
profile = false
# Set MPI-parallel mode on/off (parallelism in cluster-like environment)
MPIparallel = false
# Set SMP-parallel mode on/off (shared-memory parallelism)
SMPparallel = false
# Decide whether to include calls to the POSIX API. On non-POSIX systems,
# including Windows, this flag must be false, unless a POSIX environment is
# emulated (such as with Cygwin).
usePOSIX = true

# Path to external libraries (other than Palabos)
libraryPaths =
# Path to inlude directories (other than Palabos)
includePaths =
# Dynamic and static libraries (other than Palabos)
libraries =

# Compiler to use without MPI parallelism
serialCXX = g++
# Compiler to use with MPI parallelism
parallelCXX = mpicxx
# General compiler flags (e.g. -Wall to turn on all warnings on g++)
compileFlags = -Wall -Wnon-virtual-dtor
# General linker flags (don't put library includes into this flag)
linkFlags =
# Compiler flags to use when optimization mode is on
optimFlags = -O3
# Compiler flags to use when debug mode is on
debugFlags = -g
# Compiler flags to use when profile mode is on
profileFlags = -pg


##########################################################################
# All code below this line is just about forwarding the options
# to SConstruct. It is recommended not to modify anything there.
##########################################################################

SCons = $(palabosRoot)/scons/scons.py -j 6 -f $(palabosRoot)/SConstruct

SConsArgs = palabosRoot=$(palabosRoot) \
projectFiles="$(projectFiles)" \
optimize=$(optimize) \
debug=$(debug) \
profile=$(profile) \
MPIparallel=$(MPIparallel) \
SMPparallel=$(SMPparallel) \
usePOSIX=$(usePOSIX) \
serialCXX=$(serialCXX) \
parallelCXX=$(parallelCXX) \
compileFlags="$(compileFlags)" \
linkFlags="$(linkFlags)" \
optimFlags="$(optimFlags)" \
debugFlags="$(debugFlags)" \
profileFlags="$(profileFlags)" \
libraryPaths="$(libraryPaths)" \
includePaths="$(includePaths)" \
libraries="$(libraries)"

compile:
python $(SCons) $(SConsArgs)

clean:
python $(SCons) -c $(SConsArgs)
/bin/rm -vf `find $(palabosRoot) -name '*~'`

Any suggestions? Thanks.
Re: Compile - undeclared identifier 'fseeko64'; did you mean 'fseeko'?
September 14, 2016 02:49PM
Try to add -DPLB_MAC_OS_X in the makefile in "compileFlags=..."
Re: Compile - undeclared identifier 'fseeko64'; did you mean 'fseeko'?
September 14, 2016 09:56PM
great thanks, that solves it.
Sorry, you do not have permission to post/reply in this forum.