hedgewars-0.9.21.1: undefined reference to symbol 'PHYSFS_readBytes'

1 reply [Last post]
YuGiOhJCJ
YuGiOhJCJ's picture
User offline. Last seen 2 years 6 weeks ago. Offline
Joined: 2010-08-27
Posts: 9

Hello,

I am on Slackware 14.1 (Linux 32 bits).
I got a problem when compiling hedgewars-0.9.21.1: undefined reference to symbol 'PHYSFS_readBytes'.
The full output :

    -- The C compiler identification is GNU 4.8.2
    -- The CXX compiler identification is GNU 4.8.2
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Building 0.9.21-r10765 (31c744824dab)
    -- Performing Test HAVE_STACKPROTECTOR
    -- Performing Test HAVE_STACKPROTECTOR - Success
    -- Performing Test HAVE_VISIBILITY
    -- Performing Test HAVE_VISIBILITY - Success
    -- Performing Test HAVE_NOEXECSTACK
    -- Performing Test HAVE_NOEXECSTACK - Success
    -- Performing Test HAVE_ORIGIN
    -- Performing Test HAVE_ORIGIN - Success
    -- Performing Test HAVE_RELROFULL
    -- Performing Test HAVE_RELROFULL - Success
    -- Performing Test HAVE_ASNEEDED
    -- Performing Test HAVE_ASNEEDED - Success
    -- Using RELEASE configuration
    -- Found GHC: /usr/bin/ghc  
    -- Looking for mask in Control.Exception
    -- Looking for mask in Control.Exception - found
    -- Looking for size in Data.Map
    -- Looking for size in Data.Map - found
    -- Looking for length in Data.Vector
    -- Looking for length in Data.Vector - found
    -- Looking for pack in Data.ByteString
    -- Looking for pack in Data.ByteString - found
    -- Looking for putDigit in Text.Show.ByteString
    -- Looking for putDigit in Text.Show.ByteString - found
    -- Looking for getHostName in Network.BSD
    -- Looking for getHostName in Network.BSD - found
    -- Looking for getCurrentTime in Data.Time
    -- Looking for getCurrentTime in Data.Time - found
    -- Looking for fix in Control.Monad.State
    -- Looking for fix in Control.Monad.State - found
    -- Looking for encode in Codec.Binary.Base64
    -- Looking for encode in Codec.Binary.Base64 - found
    -- Looking for warningM in System.Log.Logger
    -- Looking for warningM in System.Log.Logger - found
    -- Looking for createProcess in System.Process
    -- Looking for createProcess in System.Process - found
    -- Looking for decode in Data.ByteString.Lazy.UTF8
    -- Looking for decode in Data.ByteString.Lazy.UTF8 - found
    -- Looking for sha1 in Data.Digest.Pure.SHA
    -- Looking for sha1 in Data.Digest.Pure.SHA - found
    -- Looking for openHandle in System.Entropy
    -- Looking for openHandle in System.Entropy - found
    -- Looking for decompress in Codec.Compression.Zlib
    -- Looking for decompress in Codec.Compression.Zlib - found
    -- Looking for getStdGen in System.Random
    -- Looking for getStdGen in System.Random - found
    -- Found Lua: /usr/lib/liblua.so  
    -- Found PhysFS: /usr/lib/libphysfs.so  
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.25")
    -- checking for module 'libavcodec'
    --   found libavcodec, version 54.92.100
    -- checking for module 'libavformat'
    --   found libavformat, version 54.63.104
    -- checking for module 'libavutil'
    --   found libavutil, version 52.18.100
    -- Found LIBAV: /usr/lib/libavcodec.so  
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE  
    -- Found SDL_image: /usr/lib/libSDL_image.so (found version "1.2.12")
    -- Found SDL_net: /usr/lib/libSDL_net.so (found version "1.2.8")
    -- Found SDL_ttf: /usr/lib/libSDL_ttf.so (found version "2.0.11")
    -- Found SDL_mixer: /usr/lib/libSDL_mixer.so (found version "1.2.12")
    -- Check for working Pascal compiler: /usr/bin/fpc
    -- Check for working Pascal compiler: /usr/bin/fpc -- works
    -- Found GLUT: /usr/lib/libglut.so  
    -- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
    -- Found PNG: /usr/lib/libpng.so (found version "1.4.12")
    -- Looking for Mix_Init in /usr/lib/libSDL_mixer.so
    -- Looking for Mix_Init in /usr/lib/libSDL_mixer.so - found
    -- Looking for IMG_Init in /usr/lib/libSDL_image.so
    -- Looking for IMG_Init in /usr/lib/libSDL_image.so - found
    -- Looking for Q_WS_X11
    -- Looking for Q_WS_X11 - found
    -- Looking for Q_WS_WIN
    -- Looking for Q_WS_WIN - not found
    -- Looking for Q_WS_QWS
    -- Looking for Q_WS_QWS - not found
    -- Looking for Q_WS_MAC
    -- Looking for Q_WS_MAC - not found
    -- Found Qt4: /usr/bin/qmake (found suitable version "4.8.5", minimum required is "4.7.0")
    -- Found Qt4: /usr/bin/qmake (found version "4.8.5")
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/build/hedgewars-src-0.9.21
    Scanning dependencies of target hedgewars-server
    [  0%] Generating ../bin/hedgewars-server
    [ 1 of 25] Compiling Consts           ( Consts.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Consts.o )
    [ 2 of 25] Compiling Store            ( Store.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Store.o )
    [ 3 of 25] Compiling Data.TConfig     ( Data/TConfig.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Data/TConfig.o )
    [ 4 of 25] Compiling JoinsMonitor     ( JoinsMonitor.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/JoinsMonitor.o )
    [ 5 of 25] Compiling RoomsAndClients  ( RoomsAndClients.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/RoomsAndClients.o )
    [ 6 of 25] Compiling CoreTypes        ( CoreTypes.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/CoreTypes.o )
    [ 7 of 25] Compiling OfficialServer.DBInteraction ( OfficialServer/DBInteraction.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/OfficialServer/DBInteraction.o )
    [ 8 of 25] Compiling ServerState      ( ServerState.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/ServerState.o )
    [ 9 of 25] Compiling Utils            ( Utils.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Utils.o )
    [10 of 25] Compiling NetRoutines      ( NetRoutines.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/NetRoutines.o )
    [11 of 25] Compiling ClientIO         ( ClientIO.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/ClientIO.o )
    [12 of 25] Compiling ConfigFile       ( ConfigFile.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/ConfigFile.o )
    [13 of 25] Compiling EngineInteraction ( EngineInteraction.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/EngineInteraction.o )
    [14 of 25] Compiling FloodDetection   ( FloodDetection.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/FloodDetection.o )
    [15 of 25] Compiling HandlerUtils     ( HandlerUtils.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HandlerUtils.o )
    [16 of 25] Compiling Votes            ( Votes.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Votes.o )
    [17 of 25] Compiling HWProtoNEState   ( HWProtoNEState.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HWProtoNEState.o )
    [18 of 25] Compiling HWProtoLobbyState ( HWProtoLobbyState.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HWProtoLobbyState.o )
    [19 of 25] Compiling HWProtoInRoomState ( HWProtoInRoomState.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HWProtoInRoomState.o )
    [20 of 25] Compiling HWProtoChecker   ( HWProtoChecker.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HWProtoChecker.o )
    [21 of 25] Compiling HWProtoCore      ( HWProtoCore.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/HWProtoCore.o )
    [22 of 25] Compiling Actions          ( Actions.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Actions.o )
    [23 of 25] Compiling ServerCore       ( ServerCore.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/ServerCore.o )
    [24 of 25] Compiling Opts             ( Opts.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Opts.o )
    [25 of 25] Compiling Main             ( /tmp/build/hedgewars-src-0.9.21/gameServer/hedgewars-server.hs, /tmp/build/hedgewars-src-0.9.21/gameServer/Main.o )
    Linking /tmp/build/hedgewars-src-0.9.21/bin/hedgewars-server ...
    [  0%] Built target hedgewars-server
    Scanning dependencies of target physlayer
    [  0%] Building C object misc/libphyslayer/CMakeFiles/physlayer.dir/physfscompat.c.o
    [  0%] Building C object misc/libphyslayer/CMakeFiles/physlayer.dir/physfsrwops.c.o
    [  1%] Building C object misc/libphyslayer/CMakeFiles/physlayer.dir/physfslualoader.c.o
    [  1%] Building C object misc/libphyslayer/CMakeFiles/physlayer.dir/hwpacksmounter.c.o
    Linking C shared library ../../bin/libphyslayer.so
    [  1%] Built target physlayer
    Scanning dependencies of target avwrapper
    [  1%] Building C object hedgewars/avwrapper/CMakeFiles/avwrapper.dir/avwrapper.c.o
    Linking C shared library ../../bin/libavwrapper.so
    [  1%] Built target avwrapper
    Scanning dependencies of target hwengine
    [  2%] Building Pascal object hedgewars/CMakeFiles/hwengine.dir/hwengine.o
    uLandGraphics.pas(404,10) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandGraphics.pas(405,26) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandGraphics.pas(648,12) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandGraphics.pas(648,29) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandGraphics.pas(650,17) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandGraphics.pas(650,35) Hint: Mixing signed expressions and longwords gives a 64bit result
    uVisualGearsHandlers.pas(173,27) Hint: Converting the operands to "Int64" before doing the subtract could prevent overflow errors.
    uGearsRender.pas(180,21) Hint: Mixing signed expressions and longwords gives a 64bit result
    uTeams.pas(652,14) Hint: Mixing signed expressions and longwords gives a 64bit result
    uTeams.pas(654,10) Hint: Mixing signed expressions and longwords gives a 64bit result
    uTeams.pas(695,14) Hint: Mixing signed expressions and longwords gives a 64bit result
    uTeams.pas(697,10) Hint: Mixing signed expressions and longwords gives a 64bit result
    uTeams.pas(734,9) Hint: Mixing signed expressions and longwords gives a 64bit result
    uScript.pas(1060,7) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandOutline.pas(256,36) Hint: Mixing signed expressions and longwords gives a 64bit result
    uLandUtils.pas(84,25) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
    uLandGenPerlin.pas(136,7) Hint: Converting the operands to "Int64" before doing the multiply could prevent overflow errors.
    Linking Pascal executable ../bin/hwengine
    Linking /tmp/build/hedgewars-src-0.9.21/bin/hwengine
    /usr/bin/ld: warning: /tmp/build/hedgewars-src-0.9.21/bin/link.res contains output sections; did you forget -T?
    /usr/bin/ld: /tmp/build/hedgewars-src-0.9.21/hedgewars/CMakeFiles/hwengine.dir/uPhysFSLayer.o: undefined reference to symbol 'PHYSFS_readBytes'
    /usr/bin/ld: note: 'PHYSFS_readBytes' is defined in DSO /usr/lib//libhwphysfs.so.1 so try adding it to the linker command line
    /usr/lib//libhwphysfs.so.1: could not read symbols: Invalid operation
    An error occurred while linking /tmp/build/hedgewars-src-0.9.21/bin/hwengine
    make[2]: *** [bin/hwengine] Error 1
    make[1]: *** [hedgewars/CMakeFiles/hwengine.dir/all] Error 2
    make: *** [all] Error 2

This problem happens with hedgewars-src-0.9.21.1 but not with hedgewars-src-0.9.20.5.
It seems to be related to physfs so let me tell you that I have physfs-2.0.3.
The missing function is here: http://icculus.org/physfs/docs-devel/html/physfs_8h.html#a63ac40ecdb3f9b91e6ee309bdbad0ce8

Any idea why I got this problem?

Thank you.
Best regards.

YuGiOhJCJ
YuGiOhJCJ's picture
User offline. Last seen 2 years 6 weeks ago. Offline
Joined: 2010-08-27
Posts: 9

Found: I need to uninstall the previous hedgewars version installed on my system.
After that, the compilation works fine.
Problem solved.

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]