fptest icon indicating copy to clipboard operation
fptest copied to clipboard

Building Selftest fails with due to missing procedures CheckEqualsWideString and CheckNotEqualsWideString

Open bigopensky opened this issue 4 years ago • 0 comments

Hi, I try to build the selftest with fpc 3.2.0 linux x86_64. Infortually the compiler gives me error messages for the missing procedures CheckEqualsWideString and CheckNotEqualsWideString.

Compiling Release Version
Free Pascal Compiler version 3.2.0 [2020/06/14] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling tests/selftest.lpr
Compiling ./tests/tests/UnitTestFramework.pas
...
UnitTestFramework.pas(7269,3) Error: Identifier not found "CheckEqualsWideString"
UnitTestFramework.pas(7270,3) Error: Identifier not found "CheckNotEqualsWideString"
UnitTestFramework.pas(7271,3) Error: Identifier not found "CheckNotEqualsWideString"
...
UnitTestFramework.pas(8083,3) Error: Identifier not found "CheckEqualsWideString"
UnitTestFramework.pas(8090,3) Error: Identifier not found "CheckEqualsWideString"
UnitTestFramework.pas(8097,3) Error: Identifier not found "CheckEqualsWideString"
UnitTestFramework.pas(8104,3) Error: Identifier not found "CheckEqualsWideString"
UnitTestFramework.pas(8111,3) Error: Identifier not found "CheckNotEqualsWideString"
UnitTestFramework.pas(8118,3) Error: Identifier not found "CheckNotEqualsWideString"
UnitTestFramework.pas(12678) Fatal: There were 9 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode

The compilation (BUILD.sh) is made by the following script:

#!/usr/bin/env bash
# --------------------------------------------
# Default build script for packages and apps
# (c) - 2021 [email protected]
# --------------------------------------------

# Minimal freepascal version
MIN_FPC_VERSION=3.2.0

# find the compiler
COMPILER=$(which fpc)

# get the coompiler version
VERSION=($COMPILER -iV)

# Retrieve processor type
CPU_SPEC=$($COMPILER -iTP)

# Retrive OS name
OS_NAME=$($COMPILER -iTO)

# Current OS target
FPC_TARGET="$CPU_SPEC-$OS_NAME"

# Path for compild units
PKG_PATH="./lib/$FPC_TARGET"

# Path for applications
APP_PATH='./bin'

# Configuration file
CONFIG=BUILD.cfg

# Package you want to build 
PACKAGES="fptest.pas"

# Optional Apps you want to build
APPLICATIONS="tests/showoverrides.lpr tests/selftest.lpr"

# Optional Apps you want to build
APPLICATIONS="tests/showoverrides.lpr tests/selftest.lpr"

# --------------------------------------------
DATE=$(date +'%Y-%m-%d.%H-%M-%S')
echo "# ----------------------------------- "
echo "# BUILD PKGS $PACKAGES AT $DATE" 
echo "# BUILD APPS $APPLICATIONS AT $DATE" 
echo "# ----------------------------------- "
echo "      BUILD.PATH:  $(pwd)"
echo "    BUILD.TARGET:  $FPC_TARGET"
echo "        COMPILER:  $COMPILER $VERSION"
echo "   WRITE.APPS.TO:  $APP_PATH"
echo "  WRITE.UNITS.TO:  $PKG_PATH"
echo "        PACKAGES:  $PACKAGES"
echo "     APPLICAIONS:  $APPLICATIONS"
echo "# ----------------------------------- "

# Check the FPC version
if [[ "$VERSION" < "$MIN_FPC_VER" ]]
then 
  echo "ERROR: Minimal FreePascal version $MIN_FPC_VER required!"
  echo "# ----------------------------------- "
  exit 1
fi 

# Add the lib path if not exists
if [ ! -e $PKG_PATH ]; then
  echo "CREATE LIB PATH $PKG_PATH"  
  mkdir -p $PKG_PATH
fi

# Add the application path if not exists
if [ ! -e $APP_PATH ]; then
  echo "CREATE APP PATH $APP_PATH"
  mkdir -p $APP_PATH
fi

# Add the application path if not exists
if [ ! -e $APP_PATH ]; then
  echo "CREATE APP PATH $APP_PATH"
  mkdir -p $APP_PATH
fi

# Run the compiler for the packages
for PKG in $PACKAGES
do
   echo ""
   echo "# ----------------------------------- "
   echo "# COMPILE PACKAGES $PKG"
   echo "# ----------------------------------- "
   $COMPILER '@'$CONFIG $PKG 
done

# Compile applications 
for APP in $APPLICATIONS
do
   echo ""
   echo "# ----------------------------------- "
   echo "# COMPILE APPLICATION $APP"
   echo "# ----------------------------------- "
   $COMPILER '@'$CONFIG -dSELFTEST $APP 
done
echo "# --- EOF --------------------------- "

The configuration (BUILD.cfg strippe comments) looks like that:

-Mdelphi
-Sgic
-Tlinux
-viwn
-FU./lib/$fpctarget
-FE./bin
-FM/unicode/
-Fu./src
-Fu./src/LCL
-Fu./src/fpGUI
-Fu./3rdparty/epiktimer
-Fu./3rdparty/utime
-Fu./tests/ref
-Fu./tests/tests
-Fu~/lib/pas/fpGUI
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl
-Fu~/.fppkg/lib/fpc/$fpcversion/units/$fpctarget/*
-Fl/usr/local/lib/
-FD/usr/lib/fpc/$fpcversion/bin/$FPCTARGET

bigopensky avatar Feb 01 '21 21:02 bigopensky