undefined reference to `stime' while building on ubuntu 20.04 with Flagship 8104

42 views
Skip to first unread message

Timo

unread,
Jun 24, 2021, 6:37:06 AMJun 24
to multisoft FlagShip

We installed FlagShip8 on a new Ubuntu 20.04 system

FS8Install reported success, but if we try to build our application on the new system, we get these errors:

-- C compiler and linker phase:
/usr/bin/ld: /usr/local/FlagShip8/lib/libFS2_8104_x64.a(fs2_date.o): in function `_bb_setdate':
fs2_date.c:(.text+0x145b): undefined reference to `stime'
/usr/bin/ld: /usr/local/FlagShip8/lib/libFS2_8104_x64.a(fs2_date.o): in function `_bb_settime':
fs2_date.c:(.text+0x1663): undefined reference to `stime'
collect2: error: ld returned 1 exit status

** Warning: C compiler or linker error (256).
   Object file and executable not created or is invalid!


Searching the error in google revealed, that it is related to 'stime' not being supported anymore by libc version 2.31 (default on Ubuntu 20.04).

The question is:
a) which libc version is needed and
b) how do we convince FlagShip8 (or libFS2_8104_x64.a) to use the older libc version?

Any ideas?

Attached is the latest FlagShip.log from the installation


***** FlagShip 8 installation started on Wed Jun 23 14:44:13 CEST 2021
-- whoami
root
-- pwd
/usr/local/FlagShip8
-- uname -a
Linux ourhostname 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
=  installation for current 64-bit system
-- cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
-- /lib/libc.so.6
./FS8install: line 310: /lib/libc.so.6: No such file or directory
-- /lib64/libc.so.6
./FS8install: line 312: /lib64/libc.so.6: No such file or directory
-- /lib32/libc.so.6
./FS8install: line 314: /lib32/libc.so.6: No such file or directory

Do you agree with the FlagShip License Agreement (yes/no/show) ? \c
Do you agree with the FlagShip License Agreement (yes/no/show) ? \c
Do you agree with the FlagShip License Agreement (yes/no/show) ? \c
... installing
Do you have also Activation key for FS2 Toolbox (y/N) ? \c
--yes
.. /usr/local/FlagShip8/etc/FS8config_32|64 updated: FlagShip_8104 added to FSLIB macro,
  FSDIR macro set to /usr/local/FlagShip8, and FS2LIB assigned by -lFS2_8104_x32|64
.. creating links to /usr/bin
.. symb.link: ln -s  /usr/local/FlagShip8/bin/FlagShip /usr/bin/FlagShip
.. symb.link: ln -s  /usr/local/FlagShip8/bin/fsman /usr/bin/fsman
.. symb.link: ln -s  /usr/local/FlagShip8/bin/newfswin /usr/bin/newfswin
.. symb.link: ln -s  /usr/local/FlagShip8/bin/newfscons /usr/bin/newfscons
.. symb.link: ln -s  /usr/local/FlagShip8/bin/newfsterm /usr/bin/newfsterm
.. symb.link: ln -s  /usr/local/FlagShip8/bin/FSwhichterm /usr/bin/FSwhichterm
.. creating links for libFlagShip*.so to /usr/lib64
.. symb.link: ln -s  /usr/local/FlagShip8/lib/libFlagShip_8104_x32.so /usr/lib64/libFlagShip_8104_x32.so
.. symb.link: ln -s  /usr/local/FlagShip8/lib/libFlagShip_8104_x64.so /usr/lib64/libFlagShip_8104_x64.so
.. creating links to /usr/share/terminfo/f from /usr/local/FlagShip8/terminfo/f
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FlagShip.map /usr/share/terminfo/FlagShip.map
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSchrmap.def /usr/share/terminfo/FSchrmap.def
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSchrmap.pl /usr/share/terminfo/FSchrmap.pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp437 /usr/share/terminfo/FSkeymap.cp437
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp720 /usr/share/terminfo/FSkeymap.cp720
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp737 /usr/share/terminfo/FSkeymap.cp737
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp850 /usr/share/terminfo/FSkeymap.cp850
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp852 /usr/share/terminfo/FSkeymap.cp852
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.cp858 /usr/share/terminfo/FSkeymap.cp858
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.def /usr/share/terminfo/FSkeymap.def
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.fre /usr/share/terminfo/FSkeymap.fre
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.ger /usr/share/terminfo/FSkeymap.ger
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.ita /usr/share/terminfo/FSkeymap.ita
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.pl /usr/share/terminfo/FSkeymap.pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.spa /usr/share/terminfo/FSkeymap.spa
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.uk /usr/share/terminfo/FSkeymap.uk
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSkeymap.us /usr/share/terminfo/FSkeymap.us
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.cp437 /usr/share/terminfo/FSsortab.cp437
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.cp737 /usr/share/terminfo/FSsortab.cp737
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.cp850 /usr/share/terminfo/FSsortab.cp850
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.cp852 /usr/share/terminfo/FSsortab.cp852
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.cp858 /usr/share/terminfo/FSsortab.cp858
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.def /usr/share/terminfo/FSsortab.def
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.ger /usr/share/terminfo/FSsortab.ger
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.greek /usr/share/terminfo/FSsortab.greek
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.iso1 /usr/share/terminfo/FSsortab.iso1
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.iso15 /usr/share/terminfo/FSsortab.iso15
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSsortab.slavic /usr/share/terminfo/FSsortab.slavic
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.arab /usr/share/terminfo/FSansi2oem.arab
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.cp437 /usr/share/terminfo/FSansi2oem.cp437
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.cp850 /usr/share/terminfo/FSansi2oem.cp850
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.cp858 /usr/share/terminfo/FSansi2oem.cp858
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.def /usr/share/terminfo/FSansi2oem.def
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.greek /usr/share/terminfo/FSansi2oem.greek
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.pl /usr/share/terminfo/FSansi2oem.pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSansi2oem.slavic /usr/share/terminfo/FSansi2oem.slavic
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.arab /usr/share/terminfo/FSguikey.arab
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.cp1250_pl /usr/share/terminfo/FSguikey.cp1250_pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.cp850 /usr/share/terminfo/FSguikey.cp850
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.cp852_pl /usr/share/terminfo/FSguikey.cp852_pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.def /usr/share/terminfo/FSguikey.def
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.greek /usr/share/terminfo/FSguikey.greek
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.iso1 /usr/share/terminfo/FSguikey.iso1
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.latin2_pl /usr/share/terminfo/FSguikey.latin2_pl
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSguikey.slavic /usr/share/terminfo/FSguikey.slavic
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FStinfo.src /usr/share/terminfo/FStinfo.src
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/FSwhichterm /usr/share/terminfo/FSwhichterm
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/verydumb.src /usr/share/terminfo/verydumb.src
.. symb.link: ln -s  /usr/local/FlagShip8/terminfo/vt102.key /usr/share/terminfo/vt102.key
.. creating FS8uninstall
.. symb.link: ln -s  /usr/local/FlagShip8/bin/FS8uninstall /usr/bin/FS8uninstall
.. Performing check for static libs
.. Checking links for Linux 64-bit .so libs
------ check/fix for 64-bit .so system libs on Wed Jun 23 14:45:42 CEST 2021
-- libstdc++.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
-- libX11.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
-- libXext.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
-- libXrender.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
-- libXft.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libXft.so.2.3.3
-- libXau.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
-- libXrender.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
-- libexpat.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.11
-- libfontconfig.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0
-- libfreetype.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libfreetype.so.6.17.1
++ libm.so created in /usr/lib/x86_64-linux-gnu: 'ln -s libm.so.6 libm.so'
-- libz.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
-- libSM.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
-- libICE.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
-- libdl.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libdl-2.31.so
-- libpthread.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
-- libxcb.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
-- libuuid.so (64-bit) is available in /usr/lib/x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libuuid.so.1.3.0
-- Note: if you wish to create and run executables in 32-bit mode,
   you will need to install libraries for 32-bit and invoke
   sudo /usr/local/FlagShip8/bin/fixlinks.sh 32 /var/log/FlagShip.log
-- Note: if your executables should run in Terminal i/o mode, add in ~/.bashrc
   if [ -z "$TERMINFO" ] ; then export TERMINFO=/lib/terminfo ; fi
.. Performing check for ttf fonts
++ Install xlsfonts (usually in the x11-utils package)
...mscorefonts fonts e.g. Courier New, Arial etc. are already available
Congratulation! The installation is done successfully.
Your FlagShip is ready to use.
You may un-install FlagShip by invoking FS8uninstall
We grant free technical support, see http://www.fship.com/support.html
E-mail your questions to <> and add always also the
output from "FlagShip -version". We will react within few working hours.

-- terminfo
-rw-r--r-- 1 root root 0 Aug  7  2006 /usr/local/FlagShip8/terminfo/f/fs_compiled_by_ncurses55
-- FlagShip -version
/usr/bin/FlagShip
lrwxrwxrwx 1 root root 33 Jun 23 14:45 /usr/bin/FlagShip -> /usr/local/FlagShip8/bin/FlagShip

For help,   invoke 'FlagShip -h' or 'FlagShip --help' or 'FlagShip /?'
To verbose, invoke 'FlagShip -v'

FlagShip PRO (unlimited users)
(c) Copyright 1989..2021 by multisoft Datentechnik, Germany
Release 8.01.04, Serial# ...kahtgssu from April 3, 2019
for Linux 32bit and 64bit systems
Using GNU libc.so Copyright 2021 Free Software Foundation Inc.
***** FlagShip 8 installation done on Wed Jun 23 14:45:42 CEST 2021

Paul

unread,
Jun 24, 2021, 6:47:13 AMJun 24
to multisoft FlagShip
Hello Timo,

this will be fixed in the next FlagShip release for Linux. In the meantime:

* add this code somewhere in your application:

// Replacement for FS2 functions setdate() and settime() in Linux
// Note: setting date or time requires application running in root or su mode!
//
function mysetdate(dDate, cTime)             // cTime hh:mm:ss is optional
if valtype(cTime) != "C" .or. !(":" $ cTime)
   cTime := time()
endif
local cDate := substr(dtos(dDate),5) + left(strtran(cTime,":",""),4)
run ("date " + cDate)
return

function mysettime(cTime)
if valtype(cTime) != "C" .or. !(":" $ cTime)
   return
endif
local dDate := date()
local cDate := substr(dtos(dDate),5) + left(strtran(cTime,":",""),4)
run ("date " + cDate)
return


* and replace invoking setdate(...) with mysetdate(...) and settime(...) with mysettime(...)

Paul

Paul

unread,
Jun 30, 2021, 8:03:50 AMJun 30
to multisoft FlagShip

We have added a patch for this problem that is available on our FTP server. If you have a licensed FS2Toolbox 8.1.04 for Linux and use the date/time functions of FS2, use this patch to avoid the link error "undefined reference to 'stime'" with Glibc > 2.31 (e.g. in Ubuntu 20+).

The file 'fs2_date_x64.o' replaces corresponding module in the FS2 Tools library named "FS2_8104_x32.lib" since the default stime() function is not available anymore in Glibc > 2.31

Download by Firefox (before version 88) or by other browser with FTP support:
  ftp://ftp.flagship.de/3/382125_84023/Download/Linux/VFS_8.1.04/patch_fs2/fs2_date_x64.o
 
or download by FTP client:
  cd /usr/local/FlagShip8/lib
  ftp ftp.flagship.de   Name = anonymous
  cd /3/382125_84023/Download/Linux/VFS_8.1.04/patch_fs2
  dir
  binary
  get fs2_date.txt
  get fs2_date_x64.o
  bye

 
and add the file fs2_date_x64.o to your link list. e.g.:

   FlagShip mymain.prg myfun*.prg /usr/local/FlagShip8/lib/fs2_date_x64.o
 
Paul
Timo schrieb am Donnerstag, 24. Juni 2021 um 12:37:06 UTC+2:
Reply all
Reply to author
Forward
0 new messages