Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
73 user(s) are online (59 user(s) are browsing Forums)

Members: 1
Guests: 72

FlynnTheAvatar, more...

Support us!

Headlines

 
  Register To Post  

Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@all

I am trying to compile OpenTESArena for educating myself.

https://github.com/afritz1/OpenTESArena

At the end of the process, while creating the OpenTESArena exe, I get this error.

src/Assets/BinaryAssetLibrary.oIn function `_ZN18BinaryAssetLibrary15WorldMapTerrain4initEPKc':
BinaryAssetLibrary.cpp:(.text+0xf60): undefined reference to 
`_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/archive.o: In function `_ZN8Archives24ConstrainedFileStreamBuf7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode'
:
archive.cpp:(.text+0x740): undefined reference to `_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/archive.o: In function 
`_ZN8Archives24ConstrainedFileStreamBuf7seekposESt4fposI10_mbstate_tESt13_Ios_Openmode':
archive.cpp:(.text+0xa2c): undefined reference to `_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/bsaarchive.oIn function `_ZN8Archives10BsaArchive4openERKNS0_5EntryE':
bsaarchive.cpp:(.text+0xfa4): undefined reference to 
`_ZNSi5seekgESt4fposI10_mbstate_tE'
collect2: error: ld returned 1 exit status
make: *** [makefile.os4:289: OpenTESArena] Error 1



This is the makefile I am using.
TARGET         OpenTESArena
VERSION 
1.0
CXX        
ppc-amigaos-g++

CXXFLAGS     = -std=c++17 -mcrt=clib2 -athread=native -D__unix__ 
CXXFLAGS    
+= -I/usr/local/amiga/ppc-amigaos/SDK/Local/newlib/include/SDL2/ -I/usr/local/amiga/ppc-amigaos/SDK/Local/newlib/include/AL/  -I/usr/local/amiga/ppc-amigaos/SDK/Local/include 
CXXLIBS        = -L/usr/local/amiga/ppc-amigaos/SDK/Local/clib2/lib/ -lopenal -L/usr/local/amiga/ppc-amigaos/SDK/Local/clib2/lib/ -lSDL2 -L/usr/local/amiga/ppc-amigaos/SDK/Local/clib2/lib/ -lwildmidi -lpthread -lstdc++
STRIP ppc-amigaos-strip

OBJS_COMMON        
src/Assets/ArenaAnimUtils.o src/Assets/ArenaSave.o src/Assets/ArenaTypes.o src/Assets/BinaryAssetLibrary.o src/Assets/CFAFile.o src/Assets/CIFFile.o  src/Assets/CityDataFile.o src/Assets/COLFile.o src/Assets/Compression.o src/Assets/DFAFile.o src/Assets/ExeData.o src/Assets/ExeTypes.o src/Assets/ExeUnpacker.o src/Assets/FLCFile.o src/Assets/FontFile.o src/Assets/IMGFile.o src/Assets/INFFile.o src/Assets/LGTFile.o \
src
/Assets/MIFFile.o \
src
/Assets/MIFUtils.o \
src
/Assets/RCIFile.o \
src
/Assets/RMDFile.o \
src
/Assets/SETFile.o \
src
/Assets/TextAssetLibrary.o \
src
/Assets/TextureAssetReference.o \
src
/Assets/TXTFile.o \
src
/Assets/VOCFile.o \
src
/Assets/WorldMapMask.o  \
src
/Audio/AudioManager.o \
src
/Audio/MusicDefinition.o \
src
/Audio/MusicLibrary.o \
src
/Audio/MusicUtils.o \
src
/Audio/WildMidi.o \
src
/Entities/AttributeModifier.o \
src
/Entities/BodyPart.o \
src
/Entities/Camera2D.o \
src
/Entities/Camera3D.o \
src
/Entities/CharacterClassDefinition.o \
src
/Entities/CharacterClassLibrary.o \
src
/Entities/CharacterEquipment.o \
src
/Entities/CitizenUtils.o \
src
/Entities/DerivedAttribute.o \
src
/Entities/DynamicEntity.o \
src
/Entities/Entity.o \
src
/Entities/EntityAnimationDefinition.o \
src
/Entities/EntityAnimationInstance.o \
src
/Entities/EntityDefinition.o \
src
/Entities/EntityDefinitionLibrary.o \
src
/Entities/EntityGeneration.o \
src
/Entities/EntityManager.o \
src
/Entities/EntityUtils.o \
src
/Entities/EntityVisibilityState.o \
src
/Entities/Player.o \
src
/Entities/PrimaryAttribute.o \
src
/Entities/StaticEntity.o \
src
/Entities/WeaponAnimation.o \
src
/Game/ArenaDateUtils.o \
src
/Game/CardinalDirection.o \
src
/Game/CharacterClassGeneration.o \
src
/Game/CharacterCreationState.o \
src
/Game/CharacterQuestion.o \
src
/Game/Clock.o \
src
/Game/Date.o \
src
/Game/Game.o \
src
/Game/GameState.o \
src
/Game/Options.o \
src
/Game/Physics.o \
src
/GameLogic/MapLogicController.o \
src
/GameLogic/PlayerLogicController.o \
src
/Input/InputActionDefinition.o \
src
/Input/InputActionEvents.o \
src
/Input/InputActionMap.o \
src
/Input/InputManager.o \
src
/Interface/AutomapPanel.o \
src
/Interface/AutomapUiController.o \
src
/Interface/AutomapUiModel.o \
src
/Interface/AutomapUiView.o \
src
/Interface/CharacterCreationUiController.o \
src
/Interface/CharacterCreationUiModel.o \
src
/Interface/CharacterCreationUiView.o \
src
/Interface/CharacterEquipmentPanel.o \
src
/Interface/CharacterPanel.o \
src
/Interface/CharacterSheetUiController.o \
src
/Interface/CharacterSheetUiModel.o \
src
/Interface/CharacterSheetUiView.o \
src
/Interface/ChooseAttributesPanel.o \
src
/Interface/ChooseClassCreationPanel.o \
src
/Interface/ChooseClassPanel.o \
src
/Interface/ChooseGenderPanel.o \
src
/Interface/ChooseNamePanel.o \
src
/Interface/ChooseRacePanel.o \
src
/Interface/CinematicPanel.o \
src
/Interface/CommonUiController.o \
src
/Interface/CommonUiView.o \
src
/Interface/FastTravelSubPanel.o \
src
/Interface/GameWorldPanel.o \
src
/Interface/GameWorldUiController.o \
src
/Interface/GameWorldUiModel.o \
src
/Interface/GameWorldUiView.o \
src
/Interface/ImagePanel.o \
src
/Interface/ImageSequencePanel.o \
src
/Interface/IntroUiController.o \
src
/Interface/IntroUiModel.o \
src
/Interface/IntroUiView.o \
src
/Interface/InventoryUiModel.o \
src
/Interface/InventoryUiView.o \
src
/Interface/LoadSavePanel.o \
src
/Interface/LoadSaveUiController.o \
src
/Interface/LoadSaveUiModel.o \
src
/Interface/LoadSaveUiView.o \
src
/Interface/LogbookPanel.o \
src
/Interface/LogbookUiController.o \
src
/Interface/LogbookUiModel.o \
src
/Interface/LogbookUiView.o \
src
/Interface/MainMenuPanel.o \
src
/Interface/MainMenuUiController.o \
src
/Interface/MainMenuUiModel.o \
src
/Interface/MainMenuUiView.o \
src
/Interface/MainQuestSplashPanel.o \
src
/Interface/MainQuestSplashUiController.o \
src
/Interface/MainQuestSplashUiModel.o \
src
/Interface/MainQuestSplashUiView.o \
src
/Interface/MessageBoxSubPanel.o \
src
/Interface/OptionsPanel.o \
src
/Interface/OptionsUiController.o \
src
/Interface/OptionsUiModel.o \
src
/Interface/OptionsUiView.o \
src
/Interface/Panel.o \
src
/Interface/PauseMenuPanel.o \
src
/Interface/PauseMenuUiController.o \
src
/Interface/PauseMenuUiModel.o \
src
/Interface/PauseMenuUiView.o \
src
/Interface/ProvinceMapPanel.o \
src
/Interface/ProvinceMapUiController.o \
src
/Interface/ProvinceMapUiModel.o \
src
/Interface/ProvinceMapUiView.o \
src
/Interface/ProvinceSearchSubPanel.o \
src
/Interface/TextCinematicPanel.o \
src
/Interface/TextCinematicUiModel.o \
src
/Interface/TextCinematicUiView.o \
src
/Interface/TextSubPanel.o \
src
/Interface/WorldMapPanel.o \
src
/Interface/WorldMapUiController.o \
src
/Interface/WorldMapUiModel.o \
src
/Interface/WorldMapUiView.o \
src
/Items/Accessory.o \
src
/Items/AccessoryArtifactData.o \
src
/Items/Armor.o \
src
/Items/ArmorArtifactData.o \
src
/Items/ArmorMaterial.o \
src
/Items/ArtifactData.o \
src
/Items/BodyArmor.o \
src
/Items/BodyArmorArtifactData.o \
src
/Items/Consumable.o \
src
/Items/HeavyArmorMaterial.o \
src
/Items/Item.o \
src
/Items/ItemCondition.o \
src
/Items/LightArmorMaterial.o \
src
/Items/MediumArmorMaterial.o \
src
/Items/Metal.o \
src
/Items/Metallic.o \
src
/Items/MiscellaneousArtifactData.o \
src
/Items/MiscellaneousItem.o \
src
/Items/Potion.o \
src
/Items/Shield.o \
src
/Items/ShieldArtifactData.o \
src
/Items/Trinket.o \
src
/Items/Weapon.o \
src
/Items/WeaponArtifactData.o \
src
/Math/MathUtils.o \
src
/Math/Matrix4.o \
src
/Math/Quad.o \
src
/Math/Quaternion.o \
src
/Math/Random.o \
src
/Math/RandomUtils.o \
src
/Math/Rect.o \
src
/Math/Vector2.o \
src
/Math/Vector3.o \
src
/Math/Vector4.o \
src
/Media/CinematicLibrary.o \
src
/Media/Color.o \
src
/Media/PortraitFile.o \
src
/Media/TextCinematicDefinition.o \
src
/Media/TextureBuilder.o \
src
/Media/TextureFileMetadata.o \
src
/Media/TextureManager.o \
src
/Media/TextureUtils.o \
src
/Rendering/ArenaRenderUtils.o \
src
/Rendering/ChunkRenderDefinition.o \
src
/Rendering/ChunkRenderInstance.o \
src
/Rendering/EntityRenderDefinition.o \
src
/Rendering/EntityRenderInstance.o \
src
/Rendering/RectangleRenderDefinition.o \
src
/Rendering/RenderCamera.o \
src
/Rendering/RenderDataBuilder.o \
src
/Rendering/RenderDefinitionGroup.o \
src
/Rendering/Renderer.o \
src
/Rendering/RendererSystem2D.o \
src
/Rendering/RendererSystem3D.o \
src
/Rendering/RendererUtils.o \
src
/Rendering/RenderFrameSettings.o \
src
/Rendering/RenderInitSettings.o \
src
/Rendering/RenderInstanceGroup.o \
src
/Rendering/RenderTextureUtils.o \
src
/Rendering/SdlUiRenderer.o \
src
/Rendering/SkyObjectRenderDefinition.o \
src
/Rendering/SkyObjectRenderInstance.o \
src
/Rendering/SoftwareRenderer.o \
src
/Rendering/VoxelRenderDefinition.o \
src
/Rendering/VoxelRenderInstance.o \
src
/UI/AnimationState.o \
src
/UI/Button.o \
src
/UI/CursorData.o \
src
/UI/FontDefinition.o \
src
/UI/FontLibrary.o \
src
/UI/GuiUtils.o \
src
/UI/ListBox.o \
src
/UI/ScrollBar.o \
src
/UI/Surface.o \
src
/UI/TextBox.o \
src
/UI/TextEntry.o \
src
/UI/TextRenderUtils.o \
src
/UI/Texture.o \
src
/UI/ToggleButton.o \
src
/UI/UiDrawCall.o \
src
/Utilities/Platform.o \
src
/Utilities/Timer.o \
src
/World/ArenaCityUtils.o \
src
/World/ArenaClimateUtils.o \
src
/World/ArenaInteriorUtils.o \
src
/World/ArenaLevelUtils.o \
src
/World/ArenaSkyUtils.o \
src
/World/ArenaVoxelUtils.o \
src
/World/ArenaWeatherUtils.o \
src
/World/ArenaWildUtils.o \
src
/World/Chunk.o \
src
/World/ChunkManager.o \
src
/World/ChunkUtils.o \
src
/World/Coord.o \
src
/World/DoorDefinition.o \
src
/World/LevelDefinition.o \
src
/World/LevelInfoDefinition.o \
src
/World/LevelInstance.o \
src
/World/LockDefinition.o \
src
/World/MapDefinition.o \
src
/World/MapGeneration.o \
src
/World/MapInstance.o \
src
/World/SkyAirDefinition.o \
src
/World/SkyDefinition.o \
src
/World/SkyGeneration.o \
src
/World/SkyInfoDefinition.o \
src
/World/SkyInstance.o \
src
/World/SkyLandDefinition.o \
src
/World/SkyLightningDefinition.o \
src
/World/SkyMoonDefinition.o \
src
/World/SkyStarDefinition.o \
src
/World/SkySunDefinition.o \
src
/World/SkyUtils.o \
src
/World/TransitionDefinition.o \
src
/World/TriggerDefinition.o \
src
/World/VoxelDefinition.o \
src
/World/VoxelGeometry.o \
src
/World/VoxelInstance.o \
src
/World/VoxelUtils.o \
src
/World/WeatherDefinition.o \
src
/World/WeatherInstance.o \
src
/World/WeatherUtils.o \
src
/WorldMap/ArenaLocationUtils.o \
src
/WorldMap/LocationDefinition.o \
src
/WorldMap/LocationInstance.o \
src
/WorldMap/ProvinceDefinition.o \
src
/WorldMap/ProvinceInstance.o \
src
/WorldMap/WorldMapDefinition.o \
src
/WorldMap/WorldMapInstance.o \
src
/components/archives/archive.o \
src
/components/archives/bsaarchive.o \
src
/components/debug/Debug.o \
src
/components/utilities/Bytes.o \
src
/components/utilities/File.o \
src
/components/utilities/FPSCounter.o \
src
/components/utilities/HexPrinter.o \
src
/components/utilities/KeyValueFile.o \
src
/components/utilities/Profiler.o \
src
/components/utilities/String.o \
src
/components/utilities/StringView.o \
src
/components/utilities/TextLinesFile.o \
src
/components/utilities/VirtualHeap.o \
src
/components/vfs/manager.o \
src
/Main.o \

OBJS1 
= $(OBJS_COMMON)

all: $(TARGET)

$(
TARGET): $(OBJS1)
    $(
CXX) $(CXXFLAGS) -$@ $^ -$(TARGET) $(CXXLIBS

clean:
    
rm -$(OBJS_COMMON) $(OBJS_TIBDAWN)
    
rm -$(TARGET) $(TARGET).$(TARGET).strip


dump
:
    
ppc-amigaos-objdump --disassemble-all --reloc $(TARGET) >$(TARGET).s

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Amigans Defender
Amigans Defender


See User information
First of all get the latest clib2 i've just released and see if this fix the problem. If you are not using it most probably seekg is not in the original clib2 (and skip the bottom comment..)

Then In my opinion g++ needs to be recompiled if you use the new clib2 because something has changed since the old clib2 version and so you can find broken stuff sometimes.
However it isn't an easy task because actual gcc downloads the clib2 from the original Olaf's site and compiles it.
So you should comment that part that download/compile clib2 and let gcc/g++ use the new clib2

I've created a script that erase only c++ stuff so you don't have to recompile the whole gcc every time but you have only to repeat the make command

Try to compile this example:
https://github.com/afxgroup/clib2/blob ... est_programs/io/seekg.cpp
And see if it works

i'm really tired...
Go to top
Re: Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@afxgroup

Thanks for your help..No I was not using your latest clib2 release.

I tried to compile clib2 (cross compiler on Cygwin64)


This is the error I get...
make -f GNUmakefile.os4 -j6
/amiga/develop/clib2/build/lib/libc.so /amiga/develop/clib2/build/lib/libc.a
mkdir 
-/usr/local/amiga/ppc-amigaos/SDK/clib2/lib
mkdir 
-/usr/local/amiga/ppc-amigaos/SDK/clib2/include
Compiling Shared [/amiga/develop/clib2/build/obj.shared/libc/stdio]                      grow_file.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      sscanf.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      sscanf_hook_entry.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      tmpfile.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      tempnam.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      tmpfile64.o
In file included from 
/usr/local/amiga/ppc-amigaos/SDK/include/include_h/proto/dos.h:74,
                 
from /amiga/develop/clib2/library/stdio/stdio_headers.h:55,
                 
from /amiga/develop/clib2/library/stdio/grow_file.c:8:
/
amiga/develop/clib2/library/stdio/grow_file.cIn function ‘__grow_file_size’:
/
amiga/develop/clib2/library/stdio/grow_file.c:38:75error‘ACTION_HANDLER_INFO’ undeclared (first use in this function); did you mean ‘ACTION_DISK_INFO’?
   
38 |         if (fh != NULL && fh->fh_MsgPort != NULL && DoPkt(fh->fh_MsgPortACTION_HANDLER_INFOMKBADDR(id), 0000))
      |                                                                           ^~~~~~~~~~~~~~~~~~~
/
amiga/develop/clib2/library/stdio/grow_file.c:38:75noteeach undeclared identifier is reported only once for each function it appears in
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      tmpnam.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      translateioerror.o
Compiling Shared 
[/amiga/develop/clib2/build/obj.shared/libc/stdio]                      ungetc.o
make
: *** [libc.gmk:950: /amiga/develop/clib2/build/obj.shared/libc/stdio/grow_file.oError 1
make
: *** Waiting for unfinished jobs....
Compiling Shared [/amiga/develop/clib2/build/obj.shared/libc/stdio]                      unlockfile.o

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Quite a regular
Quite a regular


See User information
If I remember this is because of the SDK version you are using. Need 53.34...

I got this error not long ago and if I recall, that's what I needed.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@rjd324

Thanks upgrading the SDK solved the problem.

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@afxgroup

After compiling new clib2 with your script, I can compile seekg.cpp code.

However same error in OpenTESArena continues..

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Amigans Defender
Amigans Defender


See User information
so it is fixed using new SDK?

i'm really tired...
Go to top
Re: Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@afxgroup

clib2 compile error fixed new SDK..
Compilation and installation went fine
seekg example compiles.

However my OpenTESArena gives the same error even if the your latest clib2 is installed..

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Just can't stay away
Just can't stay away


See User information
@SinanSam460

not sure if it matter but::

CXXFLAGS    += -I/usr/local/amiga/ppc-amigaos/SDK/Local/newlib/include/SDL2/ -I/usr/local/amiga/ppc-amigaos/SDK/Local/newlib/include/AL/  -I/usr/local/amiga/ppc-amigaos/SDK/Local/include 


if you're using CLIB2, then you should use CLIB2 includes not NEWLIB.

Go to top
Re: Porting OpenTESArena
Amigans Defender
Amigans Defender


See User information
@SinanSam460

Quote:
However my OpenTESArena gives the same error even if the your latest clib2 is installed


But which one? The ACTION_HANDLER_INFO error?

i'm really tired...
Go to top
Re: Porting OpenTESArena
Not too shy to talk
Not too shy to talk


See User information
@afxgroup

sorry for not being clear.

ACTION_HANDLER_INFO error is gone after upgrading SDK to latest beta. So I was able to compile clib2.

However this error still occurs after re-compiling OpenTESArena with latest clib2.

src/Assets/BinaryAssetLibrary.oIn function `_ZN18BinaryAssetLibrary15WorldMapTerrain4initEPKc':
BinaryAssetLibrary.cpp:(.text+0xf60): undefined reference to 
`_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/archive.o: In function `_ZN8Archives24ConstrainedFileStreamBuf7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode'
:
archive.cpp:(.text+0x740): undefined reference to `_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/archive.o: In function 
`_ZN8Archives24ConstrainedFileStreamBuf7seekposESt4fposI10_mbstate_tESt13_Ios_Openmode':
archive.cpp:(.text+0xa2c): undefined reference to `_ZNSi5seekgESt4fposI10_mbstate_tE'
src/components/archives/bsaarchive.oIn function `_ZN8Archives10BsaArchive4openERKNS0_5EntryE':
bsaarchive.cpp:(.text+0xfa4): undefined reference to 
`_ZNSi5seekgESt4fposI10_mbstate_tE'
collect2: error: ld returned 1 exit status
make: *** [makefile.os4:289: OpenTESArena] Error 1

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: Porting OpenTESArena
Home away from home
Home away from home


See User information
@SinanSam460

Something did not linked. messing around width different clibs, maybe you should do a "make clean" and then do a "make all"

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Porting OpenTESArena
Home away from home
Home away from home


See User information
@Sinan
Very possible that you have linking errors beause of mixing newlib includes with clib2 libs as Javier says.

Better to remove whole working directory, recreate makefile with all corrrect includes, etc, and rebuild all from scratch.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project