Comments (12)
That's odd. CMake should have errored if it couldn't find SDL2_image, it is listed as required:
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
And then there should be something like this in CMakeCache.txt:
SDL2IMAGE_LIBDIR:INTERNAL=/usr/lib
As a workaround, you might try passing the library's directory straight to the linker in CMakeLists.txt:
target_link_libraries(barony -L/usr/pkg/lib/ -lSDL2_image)
And remove ${SDL2IMAGE_LIBRARIES} ${SDL2_IMAGE_LIBRARIES}
from line 311.
from barony.
If I change the line 311 only, it will stop at the same 14% complaining for the same reason.
If I change the line 392 (which contain the same as 311), it will build at 100% and complain with the same error as the one I had at 14%
If I change them both, here's how it ends : http://pastebin.com/jGZJXNy8
By the way, the two lines now look like this :
target_link_libraries(editor ${SDL2_LIBRARIES} ${SDL2_LIBRARY} -L/usr/pkg/lib/ -lSDL2_image ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY})
Also, here is the Makefile someone did for barony on NetBSD https://github.com/joyent/pkgsrc-wip/blob/master/barony/Makefile
With this Makefile (for pkgsrc), it will correctly build the 2.0.4
from barony.
If I change the line 311 only, it will stop at the same 14% complaining for the same reason.
If I change the line 392 (which contain the same as 311), it will build at 100% and complain with the same error as the one I had at 14%
CMake generates a makefile that compiles the Editor first, and then Barony. The error that occurs at 14% is most likely the editor failing to link. Likewise, the error that occurs at 100% would likely be Barony failing to link.
Line 311 corresponds to linker settings for Barony.
Line 392 corresponds to linker settings for the editor.
If I change them both, here's how it ends : http://pastebin.com/jGZJXNy8
CMakeFiles/barony.dir/src/game.cpp.o: In function `segfault_sigaction(int, siginfo*, void*)':
game.cpp:(.text+0x34): undefined reference to `backtrace'
game.cpp:(.text+0x55): undefined reference to `backtrace_symbols_fd'
This tells me that something's breaking in the segfault catching code. If I had to guess, it'd be differences between Linux and NetBSD, and NetBSD may need to include some additional library for the backtrace()
and backtrace_symbols_fd()
functions?
I'm afraid I can't help you with anything NetBSD specific like that.
Doing a quick google search led me to this:
http://trac.wxwidgets.org/ticket/14942
I see this line in there: AC_TRY_LINK([#include <execinfo.h>]
Barony does indeed include execinfo.h, for the aforementioned segfault related functionality.
Searching for execinfo.h and BSD, I came across this page:
https://www.freebsd.org/doc/en/books/porters-handbook/uses-execinfo.html
You might try linking libexecinfo?
Alternatively, you could just delete the segfault_sigaction()
function in game.cpp. That should only be compiled if LINUX is defined anyway, I cannot guarantee that specific code will work on any other platform. (And/or remove the define for LINUX in config.hpp, though that may or may not have other side-effects)
from barony.
Hmm, more searching: https://github.com/01org/hyperscan/blob/master/cmake/backtrace.cmake
The `backtrace' function is available on Linux via glibc, and on FreeBSD if
the 'libexecinfo' package is installed.
Let me know if linking libexecinfo fixes it.
from barony.
Ok so I changed the two lines like that
target_link_libraries(editor ${SDL2_LIBRARIES} ${SDL2_LIBRARY} -L/usr/pkg/lib/ -lSDL2_image ${SDL2_NET_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${SDL2TTF_LIBRARY} -L/usr/pkg/lib -lexecinfo)
And it worked
[ 97%] Building CXX object CMakeFiles/barony.dir/src/interface/bookgui.cpp.o
[ 98%] Building CXX object CMakeFiles/barony.dir/src/interface/shopgui.cpp.o
[ 99%] Building CXX object CMakeFiles/barony.dir/src/interface/removecurse.cpp.o
[100%] Linking CXX executable barony
[100%] Built target barony
from barony.
I tried to run it, I arrived to the menu so I wanted to visit the options but I have something weird, I don't know if it's NetBSD related
http://i.imgur.com/6xxN2Fq.png
http://i.imgur.com/oZIPEhg.png
Other menus are correctly displayed, only these two are weird
from barony.
How are you running Barony? It looks like the directory you're running it from doesn't have the latest lang/en.txt
from barony.
I downloaded Barony for GNU/Linux through GOG (the 2.0.4)
I copied the entire game into my NetBSD and stuck the newly built "barony" binary into the place where barony.x86_64 from GNU/Linux is. I cd
to it then ./barony
-rw-r--r-- 1 Adrien2002 users 12158 Feb 5 01:10 BaronyEditor_Icon256x256.png
-rw-r--r-- 1 Adrien2002 users 5586 Feb 5 01:10 Barony_Icon256x256.png
-rw-r--r-- 1 Adrien2002 users 7530 Feb 5 01:10 EDITING.txt
-rw-r--r-- 1 Adrien2002 users 1109 Feb 5 01:10 LICENSE.SDL2_ttf.txt
-rw-r--r-- 1 Adrien2002 users 6860 Feb 5 01:10 LICENSE.freetype.txt
-rw-r--r-- 1 Adrien2002 users 3746 Feb 5 01:10 LICENSE.txt
-rw-r--r-- 1 Adrien2002 users 1415 Feb 5 01:10 LICENSE.zlib.txt
-rw-r--r-- 1 Adrien2002 users 419 Feb 5 01:10 README-SDL.txt
-rw-r--r-- 1 Adrien2002 users 4816 Feb 5 01:10 README.txt
-rwxr-xr-x 1 Adrien2002 users 1012744 Feb 5 01:10 barony
-rwxr-xr-x 1 Adrien2002 users 1037464 Feb 5 01:10 barony.x86_64
drwx------ 2 Adrien2002 users 1536 Feb 5 01:10 books
-rw-r--r-- 1 Adrien2002 users 1884 Feb 5 01:22 default.cfg
-rwxr-xr-x 1 Adrien2002 users 181368 Feb 5 01:11 editor
-rwxr-xr-x 1 Adrien2002 users 209552 Feb 5 01:10 editor.x86_64
drwx------ 5 Adrien2002 users 512 Feb 5 01:10 images
drwx------ 3 Adrien2002 users 512 Feb 5 01:10 items
drwx------ 2 Adrien2002 users 512 Feb 5 01:10 lang
-rw-r--r-- 1 Adrien2002 users 6322168 Feb 5 01:10 libSDL2-2.0.so.0
-rw-r--r-- 1 Adrien2002 users 88568 Feb 5 01:10 libSDL2_image-2.0.so.0
-rw-r--r-- 1 Adrien2002 users 18680 Feb 5 01:10 libSDL2_net-2.0.so.0
-rw-r--r-- 1 Adrien2002 users 30976 Feb 5 01:10 libSDL2_ttf-2.0.so.0
-rw-r--r-- 1 Adrien2002 users 1487488 Feb 5 01:10 libfmodex.so
-rw-r--r-- 1 Adrien2002 users 220288 Feb 5 01:10 libpng16.so.16
-rw-r--r-- 1 Adrien2002 users 193919 Feb 5 01:10 libsteam_api.so
-rw-r--r-- 1 Adrien2002 users 88592 Feb 5 01:10 libz.so.1
-rw-r--r-- 1 Adrien2002 users 4669 Feb 5 01:22 log.txt
drwx------ 2 Adrien2002 users 5632 Feb 5 01:10 maps
drwx------ 8 Adrien2002 users 512 Feb 5 01:10 models
drwx------ 2 Adrien2002 users 1024 Feb 5 01:10 music
-rw-r--r-- 1 Adrien2002 users 1695 Feb 5 01:21 savegame.dat
-rw-r--r-- 1 Adrien2002 users 45 Feb 5 01:21 savegame2.dat
-rw-r--r-- 1 Adrien2002 users 36 Feb 5 01:20 scores.dat
drwx------ 2 Adrien2002 users 6656 Feb 5 01:10 sound
-rw-r--r-- 1 Adrien2002 users 6 Feb 5 01:10 steam_appid.txt
from barony.
Ya, you'll need to copy over lang/en.txt from the repository.
from barony.
Oh, I didn't know the update were coming with a new lang text !
from barony.
Ok so I just tried, played a while in the game and it is working flawlessly.
Everything is perfect !
Thank you very much for your help and your work on the sound system (and more that I'm not aware of). I can finally play it on NetBSD !
Thank you again, addictgamer :)
from barony.
You're welcome, although @ptitSeb implemented OpenAL support :)
from barony.
Related Issues (20)
- Audio Bug HOT 2
- Restart after last player dies, game over screen appears after restart HOT 4
- [Linux] Cannot compile source code HOT 5
- Torches being used whilst transformed with no effect HOT 1
- ally repeat command while reading tutorial sign crashes game HOT 1
- Missing Images Directory HOT 1
- [Linux] Missing Menu Text on Unchanged Build HOT 3
- [Linux] [Steamworks] [4.0.2] Cannot build with steamworks HOT 1
- Surround sound backwards in Windows
- Asset Replacement Bug: Player, Item, and Block Replacement by Green Orb HOT 1
- Crash in Tinkering Tutorial HOT 3
- [Bug] Light Level Calculated incorrectly for low Stealth and negative perception
- [Windows][Multiplayer] Unplayable multiplayer via Steam: very long wait for interaction, weird teleportation between levels
- [Switch] Game crashes when attempting to view skill list HOT 2
- Broken textures: everything looks like green ball HOT 1
- Add NOGDI define for building on Windows
- [Switch] cant write in a online lobby
- Fix game stutters upon doing something for the first time HOT 3
- Debian 12 - GOG edition - Failed loading libpng12.so.0 HOT 1
- BUG: Some iterator out-of-bound access bugs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barony.