[Pkg-pascal-devel] Bug#780905: Bug#780905: fp-compiler-2.6.4: fpc fails to link programs using fpmkunit

Abou Al Montacir abou.almontacir at sfr.fr
Sun Dec 6 13:51:48 UTC 2015


Hi All,
On Sat, 2015-12-05 at 15:23 +0100, Gilles Risch wrote:
> program ReproduceBug;
> 
> {$mode objfpc}{$H+}
> 
> uses
>      {$ifdef unix}cthreads;{$endif}
> 
> begin
>      writeln('using cthreads seems to be the root cause of this bug.');
> end.
I just tried the above program and it worked perfect:
$cat - > test.pas
program ReproduceBug;
{$mode objfpc}{$H+}
uses
     {$ifdef unix}cthreads;{$endif}
begin
     writeln('using cthreads seems to be the root cause of this bug.');
end.
$fpc test.pas 
Free Pascal Compiler version 2.6.4+dfsg-8 [2015/08/14] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test.pas
Linking test
[some blank lines]
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
10 lines compiled, 0.5 sec 
$./test 
using cthreads seems to be the root cause of this bug.
$uname -a
Linux lt-mazen 4.2.0-1-amd64 #1 SMP Debian 4.2.6-1 (2015-11-10) x86_64 GNU/Linux
$dpkg-architecture 
DEB_BUILD_ARCH=amd64
DEB_BUILD_ARCH_BITS=64
DEB_BUILD_ARCH_CPU=amd64
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=x86_64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=x86_64-linux-gnu
DEB_BUILD_MULTIARCH=x86_64-linux-gnu
DEB_HOST_ARCH=amd64
DEB_HOST_ARCH_BITS=64
DEB_HOST_ARCH_CPU=amd64
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=x86_64
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=x86_64-linux-gnu
DEB_HOST_MULTIARCH=x86_64-linux-gnu
DEB_TARGET_ARCH=amd64
DEB_TARGET_ARCH_BITS=64
DEB_TARGET_ARCH_CPU=amd64
DEB_TARGET_ARCH_ENDIAN=little
DEB_TARGET_ARCH_OS=linux
DEB_TARGET_GNU_CPU=x86_64
DEB_TARGET_GNU_SYSTEM=linux-gnu
DEB_TARGET_GNU_TYPE=x86_64-linux-gnu
DEB_TARGET_MULTIARCH=x86_64-linux-gnu
$dpkg -l '*:i386'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-===========================================================
ii  gcc-5-base:i386             5.2.1-23           i386               GCC, the GNU Compiler Collection (base package)
ii  gstreamer1.0-plugins-base:i 1.6.1-1            i386               GStreamer plugins from the "base" set
ii  i965-va-driver:i386         1.6.1-1            i386               VAAPI driver for Intel G45 & HD Graphics family
ii  libasound2:i386             1.0.29-1           i386               shared library for ALSA applications
ii  libasound2-plugins:i386     1.0.29-1           i386               ALSA library additional plugins
ii  libasyncns0:i386            0.8-5              i386               Asynchronous name service query library
ii  libatk1.0-0:i386            2.18.0-1           i386               ATK accessibility toolkit
ii  libattr1:i386               1:2.4.47-2         i386               Extended attribute shared library
ii  libaudio2:i386              1.9.4-3            i386               Network Audio System - shared libraries
ii  libavahi-client3:i386       0.6.32~rc+dfsg-1   i386               Avahi client library
ii  libavahi-common-data:i386   0.6.32~rc+dfsg-1   i386               Avahi common data files
ii  libavahi-common3:i386       0.6.32~rc+dfsg-1   i386               Avahi common library
ii  libavcodec-ffmpeg56:i386    7:2.8.3-1          i386               FFmpeg library with de/encoders for audio/video codecs - ru
ii  libavresample-ffmpeg2:i386  7:2.8.3-1          i386               FFmpeg compatibility library for resampling - runtime files
ii  libavutil-ffmpeg54:i386     7:2.8.3-1          i386               FFmpeg library with functions for simplifying programming -
ii  libbsd0:i386                0.7.0-2            i386               utility functions from BSD systems - shared library
ii  libc6:i386                  2.19-22            i386               GNU C Library: Shared libraries
ii  libc6-i686:i386             2.19-22            i386               GNU C Library: Shared libraries [i686 optimized]
ii  libcairo2:i386              1.14.4-1           i386               Cairo 2D vector graphics library
ii  libcap2:i386                1:2.24-12          i386               POSIX 1003.1e capabilities (library)
ii  libcdparanoia0:i386         3.10.2+debian-11   i386               audio extraction tool for sampling CDs (library)
ii  libcomerr2:i386             1.42.13-1          i386               common error description library
ii  libcrystalhd3:i386          1:0.0~git20110715. i386               Crystal HD Video Decoder (shared library)
ii  libcups2:i386               2.1.0-6            i386               Common UNIX Printing System(tm) - Core library
ii  libdatrie1:i386             0.2.10-1           i386               Double-array trie library
ii  libdbus-1-3:i386            1.10.4-1           i386               simple interprocess messaging system (library)
ii  libdrm-amdgpu1:i386         2.4.65-3           i386               Userspace interface to amdgpu-specific kernel DRM services 
ii  libdrm-intel1:i386          2.4.65-3           i386               Userspace interface to intel-specific kernel DRM services -
ii  libdrm-nouveau2:i386        2.4.65-3           i386               Userspace interface to nouveau-specific kernel DRM services
ii  libdrm-radeon1:i386         2.4.65-3           i386               Userspace interface to radeon-specific kernel DRM services 
ii  libdrm2:i386                2.4.65-3           i386               Userspace interface to kernel DRM services -- runtime
ii  libedit2:i386               3.1-20150325-1     i386               BSD editline and history libraries
ii  libelf1:i386                0.163-5.1          i386               library to read and write ELF files
ii  libexpat1:i386              2.1.0-7            i386               XML parsing C library - runtime library
ii  libffi6:i386                3.2.1-3            i386               Foreign Function Interface library runtime
ii  libflac8:i386               1.3.1-4            i386               Free Lossless Audio Codec - runtime C library
ii  libfontconfig1:i386         2.11.0-6.3         i386               generic font configuration library - runtime
ii  libfreetype6:i386           2.6.1-0.1          i386               FreeType 2 font engine, shared library files
ii  libgcc1:i386                1:5.2.1-23         i386               GCC support library
ii  libgcrypt20:i386            1.6.4-3            i386               LGPL Crypto library - runtime library
ii  libgdk-pixbuf2.0-0:i386     2.32.2-1           i386               GDK Pixbuf library
ii  libgl1-mesa-dri:i386        11.0.6-1           i386               free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:i386        11.0.6-1           i386               free implementation of the OpenGL API -- GLX runtime
ii  libglapi-mesa:i386          11.0.6-1           i386               free implementation of the GL API -- shared library
ii  libglib2.0-0:i386           2.46.2-1           i386               GLib library of C routines
ii  libgmp10:i386               2:6.1.0+dfsg-2     i386               Multiprecision arithmetic library
ii  libgnutls-deb0-28:i386      3.3.18-1           i386               GNU TLS library - main runtime library
ii  libgpg-error0:i386          1.20-1             i386               library for common error values and messages in GnuPG compo
ii  libgpm2:i386                1.20.4-6.1+b2      i386               General Purpose Mouse - shared library
ii  libgraphite2-3:i386         1.3.3-1            i386               Font rendering engine for Complex Scripts -- library
ii  libgsm1:i386                1.0.13-4           i386               Shared libraries for GSM speech compressor
ii  libgssapi-krb5-2:i386       1.13.2+dfsg-4      i386               MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
ii  libgstreamer-plugins-base1. 1.6.1-1            i386               GStreamer libraries from the "base" set
ii  libgstreamer1.0-0:i386      1.6.1-1            i386               Core GStreamer libraries and elements
ii  libgtk2.0-0:i386            2.24.28-1          i386               GTK+ graphical user interface library
ii  libharfbuzz0b:i386          1.0.1-1+b1         i386               OpenType text shaping engine (shared library)
ii  libhogweed4:i386            3.1.1-4            i386               low level cryptographic library (public-key cryptos)
ii  libice6:i386                2:1.0.9-1+b1       i386               X11 Inter-Client Exchange library
ii  libjack-jackd2-0:i386       1.9.10+20150825git i386               JACK Audio Connection Kit (libraries)
ii  libjbig0:i386               2.1-3.1            i386               JBIGkit libraries
ii  libjpeg62-turbo:i386        1:1.4.1-2          i386               libjpeg-turbo JPEG runtime library
ii  libjson-c2:i386             0.11-4             i386               JSON manipulation library - shared library
ii  libk5crypto3:i386           1.13.2+dfsg-4      i386               MIT Kerberos runtime libraries - Crypto Library
ii  libkeyutils1:i386           1.5.9-8            i386               Linux Key Management Utilities (library)
ii  libkrb5-3:i386              1.13.2+dfsg-4      i386               MIT Kerberos runtime libraries
ii  libkrb5support0:i386        1.13.2+dfsg-4      i386               MIT Kerberos runtime libraries - Support library
ii  liblcms2-2:i386             2.6-3+b3           i386               Little CMS 2 color management library
ii  libllvm3.5v5:i386           1:3.5.2-3          i386               Modular compiler and toolchain technologies, runtime librar
ii  libllvm3.7:i386             1:3.7-4            i386               Modular compiler and toolchain technologies, runtime librar
ii  liblzma5:i386               5.1.1alpha+2012061 i386               XZ-format compression library
ii  libmng1:i386                1.0.10+dfsg-3.1+b3 i386               Multiple-image Network Graphics library
ii  libmp3lame0:i386            3.99.5+repack1-9+b i386               MP3 encoding library
ii  libncurses5:i386            6.0+20151024-2     i386               shared libraries for terminal handling
ii  libnettle6:i386             3.1.1-4            i386               low level cryptographic library (symmetric and one-way cryp
ii  libnuma1:i386               2.0.10-1           i386               Libraries for controlling NUMA policy
ii  libogg0:i386                1.3.2-1            i386               Ogg bitstream library
ii  libopenjpeg5:i386           1:1.5.2-3.1        i386               JPEG 2000 image compression/decompression library - runtime
ii  libopus0:i386               1.1.1-1            i386               Opus codec runtime library
ii  liborc-0.4-0:i386           1:0.4.24-1         i386               Library of Optimized Inner Loops Runtime Compiler
ii  libp11-kit0:i386            0.23.1-3           i386               Library for loading and coordinating access to PKCS#11 modu
ii  libpango-1.0-0:i386         1.38.1-1           i386               Layout and rendering of internationalized text
ii  libpangocairo-1.0-0:i386    1.38.1-1           i386               Layout and rendering of internationalized text
ii  libpangoft2-1.0-0:i386      1.38.1-1           i386               Layout and rendering of internationalized text
ii  libpciaccess0:i386          0.13.4-1           i386               Generic PCI access library for X
ii  libpcre3:i386               2:8.35-8           i386               Perl 5 Compatible Regular Expression Library - runtime file
ii  libpixman-1-0:i386          0.33.4-1           i386               pixel-manipulation library for X and cairo
ii  libpng12-0:i386             1.2.54-1           i386               PNG library - runtime
ii  libpulse0:i386              7.1-2              i386               PulseAudio client libraries
ii  libqt4-dbus:i386            4:4.8.7+dfsg-4     i386               Qt 4 D-Bus module
ii  libqt4-network:i386         4:4.8.7+dfsg-4     i386               Qt 4 network module
ii  libqt4-opengl:i386          4:4.8.7+dfsg-4     i386               Qt 4 OpenGL module
ii  libqt4-xml:i386             4:4.8.7+dfsg-4     i386               Qt 4 XML module
ii  libqt4-xmlpatterns:i386     4:4.8.7+dfsg-4     i386               Qt 4 XML patterns module
ii  libqtcore4:i386             4:4.8.7+dfsg-4     i386               Qt 4 core module
ii  libqtdbus4:i386             4:4.8.7+dfsg-4     i386               Qt 4 D-Bus module library
ii  libqtgui4:i386              4:4.8.7+dfsg-4     i386               Qt 4 GUI module
ii  libqtwebkit4:i386           2.3.4.dfsg-5       i386               Web content engine library for Qt
ii  libsamplerate0:i386         0.1.8-8            i386               Audio sample rate conversion library
ii  libschroedinger-1.0-0:i386  1.0.11-2.1         i386               library for encoding/decoding of Dirac video streams
ii  libselinux1:i386            2.4-3              i386               SELinux runtime shared libraries
ii  libshine3:i386              3.1.0-2.1          i386               Fixed-point MP3 encoding library - runtime files
ii  libsm6:i386                 2:1.2.2-1+b1       i386               X11 Session Management library
ii  libsnappy1v5:i386           1.1.3-2            i386               fast compression/decompression library
ii  libsndfile1:i386            1.0.25-10          i386               Library for reading/writing audio files
ii  libspeex1:i386              1.2~rc1.2-1        i386               The Speex codec runtime library
ii  libspeexdsp1:i386           1.2~rc1.2-1        i386               The Speex extended runtime library
ii  libsqlite3-0:i386           3.9.2-1            i386               SQLite 3 shared library
ii  libssl1.0.0:i386            1.0.2d-1           i386               Secure Sockets Layer toolkit - shared libraries
ii  libstdc++6:i386             5.2.1-23           i386               GNU Standard C++ Library v3
ii  libswresample-ffmpeg1:i386  7:2.8.3-1          i386               FFmpeg library for audio resampling, rematrixing etc. - run
ii  libsystemd0:i386            228-2              i386               systemd utility library
ii  libtasn1-6:i386             4.7-2              i386               Manage ASN.1 structures (runtime)
ii  libthai0:i386               0.1.24-1           i386               Thai language support library
ii  libtheora0:i386             1.1.1+dfsg.1-7     i386               Theora Video Compression Codec
ii  libtiff5:i386               4.0.5-1            i386               Tag Image File Format (TIFF) library
ii  libtinfo5:i386              6.0+20151024-2     i386               shared low-level terminfo library for terminal handling
ii  libtwolame0:i386            0.3.13-1.2         i386               MPEG Audio Layer 2 encoding library
ii  libtxc-dxtn-s2tc0:i386      0~git20131104-1.1  i386               Texture compression library for Mesa
ii  libudev1:i386               228-2              i386               libudev shared library
ii  libuuid1:i386               2.27.1-1           i386               Universally Unique ID library
ii  libva1:i386                 1.6.1-1            i386               Video Acceleration (VA) API for Linux -- runtime
ii  libvdpau1:i386              1.1.1-3            i386               Video Decode and Presentation API for Unix (libraries)
ii  libvisual-0.4-0:i386        0.4.0-8            i386               audio visualization framework
ii  libvorbis0a:i386            1.3.4-3            i386               decoder library for Vorbis General Audio Compression Codec
ii  libvorbisenc2:i386          1.3.4-3            i386               encoder library for Vorbis General Audio Compression Codec
ii  libvpx2:i386                1.4.0-4            i386               VP8 and VP9 video codec (shared library)
ii  libwavpack1:i386            4.75.0-1           i386               audio codec (lossy and lossless) - library
ii  libwebp5:i386               0.4.4-1            i386               Lossy compression of digital photographic images.
ii  libwrap0:i386               7.6.q-25           i386               Wietse Venema's TCP wrappers library
ii  libx11-6:i386               2:1.6.3-1          i386               X11 client-side library
ii  libx11-xcb1:i386            2:1.6.3-1          i386               Xlib/XCB interface library
ii  libx264-148:i386            2:0.148.2601+gita0 i386               x264 video coding library
ii  libx265-68:i386             1.8-4              i386               H.265/HEVC video stream encoder (shared library)
ii  libxau6:i386                1:1.0.8-1          i386               X11 authorisation library
ii  libxcb-dri2-0:i386          1.10-3+b1          i386               X C Binding, dri2 extension
ii  libxcb-dri3-0:i386          1.10-3+b1          i386               X C Binding, dri3 extension
ii  libxcb-glx0:i386            1.10-3+b1          i386               X C Binding, glx extension
ii  libxcb-present0:i386        1.10-3+b1          i386               X C Binding, present extension
ii  libxcb-randr0:i386          1.10-3+b1          i386               X C Binding, randr extension
ii  libxcb-render0:i386         1.10-3+b1          i386               X C Binding, render extension
ii  libxcb-shape0:i386          1.10-3+b1          i386               X C Binding, shape extension
ii  libxcb-shm0:i386            1.10-3+b1          i386               X C Binding, shm extension
ii  libxcb-sync1:i386           1.10-3+b1          i386               X C Binding, sync extension
ii  libxcb-xfixes0:i386         1.10-3+b1          i386               X C Binding, xfixes extension
ii  libxcb1:i386                1.10-3+b1          i386               X C Binding
ii  libxcomposite1:i386         1:0.4.4-1          i386               X11 Composite extension library
ii  libxcursor1:i386            1:1.1.14-1+b1      i386               X cursor management library
ii  libxdamage1:i386            1:1.1.4-2+b1       i386               X11 damaged region extension library
ii  libxdmcp6:i386              1:1.1.2-1          i386               X11 Display Manager Control Protocol library
ii  libxext6:i386               2:1.3.3-1          i386               X11 miscellaneous extension library
ii  libxfixes3:i386             1:5.0.1-2+b2       i386               X11 miscellaneous 'fixes' extension library
ii  libxi6:i386                 2:1.7.5-1          i386               X11 Input extension library
ii  libxinerama1:i386           2:1.1.3-1+b1       i386               X11 Xinerama extension library
ii  libxrandr2:i386             2:1.5.0-1          i386               X11 RandR extension library
ii  libxrender1:i386            1:0.9.9-2          i386               X Rendering Extension client library
ii  libxshmfence1:i386          1.2-1              i386               X shared memory fences - shared library
ii  libxss1:i386                1:1.2.2-1          i386               X11 Screen Saver extension library
ii  libxt6:i386                 1:1.1.5-1          i386               X11 toolkit intrinsics library
ii  libxtst6:i386               2:1.2.2-1+b1       i386               X11 Testing -- Record extension library
ii  libxv1:i386                 2:1.0.10-1+b1      i386               X11 Video extension library
ii  libxvidcore4:i386           2:1.3.4-1          i386               Open source MPEG-4 video codec (library)
ii  libxxf86vm1:i386            1:1.1.4-1          i386               X11 XFree86 video mode extension library
ii  libzvbi0:i386               0.2.35-10          i386               Vertical Blanking Interval decoder (VBI) - runtime files
ii  skype:i386                  4.3.0.37-1         i386               Wherever you are, wherever they are
ii  va-driver-all:i386          1.6.1-1            i386               Video Acceleration (VA) API -- driver metapackage
ii  vdpau-va-driver:i386        0.7.4-4            i386               VDPAU-based backend for VA API
ii  zlib1g:i386                 1:1.2.8.dfsg-2+b1  i386               compression library - runtime
As you can see I have both gcc and libc installed for i386 and this programs
works.
i think this probably happens that the compiler finds the i386 linker and thus
looks for the i386 libs.
Can you please attach the link.res file?
-- 
Cheers,
Abou Al Montacir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20151206/ecbde6d7/attachment-0003.html>


More information about the Pkg-pascal-devel mailing list