Coder Social home page Coder Social logo

Compile error about devilutionx HOT 19 CLOSED

diasurgical avatar diasurgical commented on April 27, 2024
Compile error

from devilutionx.

Comments (19)

 avatar commented on April 27, 2024 1

Good day and salutations,

I was able to compile this on a clean new system

My history...


   1  apt-get install g++-multilib libc6-dev-i386
    2  apt-get install cmake
    3  apt-get install libsdl2-dev:i386
    4  sudo dpkg --add-architecture i386
    5  sudo apt-get update
    6  vim /etc/resolv.conf 
    7  sudo apt-get update
    8  apt-get install libsdl2-dev:i386
    9  apt-get install libsdl2-mixer-dev:i386
   10  ls
   11  vim usr/lib/i386-linux-gnu/cmake/SDL2/sdl2-config.cmake
   12  history

in file vim usr/lib/i386-linux-gnu/cmake/SDL2/sdl2-config.cmake


# sdl2 cmake project-config input for ./configure scripts

set(prefix "/usr")
set(exec_prefix "${prefix}")
set(libdir "${prefix}/lib/i386-linux-gnu")
set(SDL2_PREFIX "/usr")
set(SDL2_EXEC_PREFIX "/usr")
set(SDL2_LIBDIR "${prefix}/lib/i386-linux-gnu")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR}  -lSDL2 -lSDL2_mixer ")

I had to comment out an include line in the code which is looking for #include <SDL_image.h>

which I will fix now.

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024 1

I solved it.
Of course there was another sdl2-config.cmake under /usr/lib32/cmake/SDL2. lol
Stupid me. :)

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

This is caused by the linker not finding SDL_mixer, it seams to happen when compiling on a 64bit platform, probably all it needs is a parameter to point it in the right direction. The problem appears to be that the way we force the compiler to 32bit causes auto discover in cmake not to work properly. The issue should go away when either compiling on a 32bit installation, or compiling to a 64bit file (however the code is not in a state where this can be done yet).

@ApertureSecurity might be able to provide some info in regards to what environment he is compiling under.
He is currently working on rebasing the code to the latest devilution, this should help significantly in terms of getting closer to be able to compile to a 64bit target.

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

@VonKossa make sure that you have added -lSDL2_mixer to the /usr/lib/i386-linux-gnu/cmake/SDL2/sdl2-config.cmake file.

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

@ApertureSecurity your history doesn't show you running cmake or make? Do you do that from a GUI tool?

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

Hi again!
Thanks for the answers.

For the record i am running Gentoo, not a debian or debian like distro.
The location for the sdl2-config.cmake seems to be /usr/lib/cmake/SDL2 for me.
I added -lSDL2_mixer like described and compiled both libsdl2 and sdl2-mixer with x86_32 support.
Same error. :(

from devilutionx.

 avatar commented on April 27, 2024

Are you wanting to compile it or do you just want to play?

I can compile it for you. Ideally , I can just release stable branches of the game.

@AJenbo, I ran cmake ..;make from the build folder. That terminal used for vim on sdl cmake.

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

Actually i want to compile it.
i believe my problem is related to x64/x86 somehow.

My sdl2-config.cmake looks different than yours:

set(prefix "/usr")
set(exec_prefix "${prefix}")
set(libdir "/usr/lib64")
set(SDL2_PREFIX "/usr")
set(SDL2_EXEC_PREFIX "/usr")
set(SDL2_LIBDIR "/usr/lib64")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lSDL2 -lSDL2_mixer")
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

Hopfully we can get SDL2_mixerfind.cmake working for 32bit builds so that it won't be needed to edit the file :)

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

It did compile and it did start, but that was about all. The game menu appeared but you are unable to choose anything with the keyboard and if you are lucky you might be able to proceed to the choose character menu if you by luck find the right pixel with the mouse. Then it segfaults. :)
I guess this is the current state right now or am i doing something wrong here?

from devilutionx.

 avatar commented on April 27, 2024

Can you launch it in terminal and give me output before it crashes please.

Thank you for this.

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

sure... just a moment. :)

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

DUMMY: ShowCursor : 0
DUMMY: FindWindowA : class: DIABLO window: (null)
DUMMY: CreateEventA : DiabloEvent

SND INIT
Opened 8 sound channels

./diabdat.mpq
./Patch_rt.mpq

SND INIT
Opened 8 sound channels

Main Menu Init
Window And Renderer Created!
GpBuffer Created
SIZE OF SCREEN 503808X 287 , Y 138
X 286 , Y 142
X 299 , Y 160
X 311 , Y 170
X 316 , Y 182
X 316 , Y 196
X 316 , Y 203
X 316 , Y 209
X 317 , Y 213
X 318 , Y 221
X 319 , Y 224
X 319 , Y 233
SinglePlayer Diablo
X 318 , Y 247
X 318 , Y 247
X 330 , Y 271
X 457 , Y 437
X 536 , Y 492
X 566 , Y 496
X 628 , Y 529
X 643 , Y 546
X 641 , Y 556
Clicked Create Hero Box

menu3 X641 Y556
X 635 , Y 567

menu3 X635 Y567
X 632 , Y 582

menu3 X632 Y582
X 598 , Y 554

menu3 X598 Y554
X 587 , Y 516

menu3 X587 Y516
X 433 , Y 438

menu3 X433 Y438
X 504 , Y 449

menu3 X504 Y449
X 513 , Y 457

menu3 X513 Y457
X 533 , Y 467

menu3 X533 Y467
X 569 , Y 492

menu3 X569 Y492
X 581 , Y 510

menu3 X581 Y510
X 617 , Y 535

menu3 X617 Y535
X 629 , Y 554

menu3 X629 Y554
X 630 , Y 572

menu3 X630 Y572
X 642 , Y 560

menu3 X642 Y560
X 580 , Y 567

menu3 X580 Y567
X 405 , Y 567

menu3 X405 Y567
X 311 , Y 546

menu3 X311 Y546
X 243 , Y 378

menu3 X243 Y378
X 253 , Y 306

menu3 X253 Y306
X 235 , Y 270

menu3 X235 Y270
X 270 , Y 303

menu3 X270 Y303
X 167 , Y 328

menu3 X167 Y328
X 138 , Y 325

menu3 X138 Y325
X 217 , Y 476

menu3 X217 Y476
X 159 , Y 493

menu3 X159 Y493
X 166 , Y 587

menu3 X166 Y587
X 175 , Y 565

menu3 X175 Y565
X 206 , Y 383

menu3 X206 Y383
X 411 , Y 315

menu3 X411 Y315
X 408 , Y 261

menu3 X408 Y261
X 322 , Y 247

menu3 X322 Y247
X 507 , Y 316

menu3 X507 Y316
X 552 , Y 360

menu3 X552 Y360
X 588 , Y 440

menu3 X588 Y440
X 598 , Y 486

menu3 X598 Y486
X 489 , Y 264

menu3 X489 Y264
X 538 , Y 329

menu3 X538 Y329
X 526 , Y 419

menu3 X526 Y419
X 533 , Y 476

menu3 X533 Y476
X 551 , Y 483

menu3 X551 Y483
X 590 , Y 492

menu3 X590 Y492
X 626 , Y 522

menu3 X626 Y522
X 636 , Y 546

menu3 X636 Y546
X 642 , Y 566

menu3 X642 Y566
X 637 , Y 581

menu3 X637 Y581
X 609 , Y 571

menu3 X609 Y571
X 647 , Y 558

menu3 X647 Y558
X 675 , Y 565

menu3 X675 Y565
X 637 , Y 566

menu3 X637 Y566
X 630 , Y 556

menu3 X630 Y556
X 571 , Y 485

menu3 X571 Y485
X 488 , Y 512

menu3 X488 Y512
X 522 , Y 558

menu3 X522 Y558
X 682 , Y 561

menu3 X682 Y561
Cancel

X 715 , Y 453
X 518 , Y 320
X 378 , Y 223
X 306 , Y 172
X 315 , Y 126
X 456 , Y 108
X 603 , Y 108
X 292 , Y 99
X 263 , Y 219
X 239 , Y 317
X 194 , Y 355
X 356 , Y 450
X 550 , Y 463
X 617 , Y 475
X 595 , Y 503
X 623 , Y 546
X 635 , Y 568
Clicked Create Hero Box

menu3 X635 Y568
X 656 , Y 568

menu3 X656 Y568
X 644 , Y 563

menu3 X644 Y563
X 615 , Y 557

menu3 X615 Y557
X 676 , Y 557

menu3 X676 Y557
Cancel

X 660 , Y 555
X 705 , Y 557
Cancel

X 730 , Y 567
X 762 , Y 552
X 701 , Y 474
X 428 , Y 361
MultiPlayer Diablo
X 415 , Y 267
SinglePlayer Diablo
X 537 , Y 310
X 207 , Y 89
X 234 , Y 118
X 351 , Y 262
X 440 , Y 379
X 114 , Y 359
X 341 , Y 228
X 159 , Y 240
X 405 , Y 187
X 261 , Y 182
X 423 , Y 87
X 368 , Y 92
X 173 , Y 178
X 169 , Y 299
X 306 , Y 443
X 534 , Y 461
X 558 , Y 489
X 586 , Y 506
X 555 , Y 479
X 519 , Y 457
X 498 , Y 438
X 512 , Y 400
X 518 , Y 427
X 524 , Y 457
X 525 , Y 467
X 535 , Y 509
X 701 , Y 541
X 606 , Y 485
X 617 , Y 451
X 577 , Y 491
X 454 , Y 462
X 420 , Y 442
X 522 , Y 438
X 555 , Y 449
X 524 , Y 453
X 515 , Y 453
X 503 , Y 448
X 441 , Y 465
X 403 , Y 393
X 488 , Y 420
X 560 , Y 456
X 501 , Y 454
X 500 , Y 448
X 521 , Y 445
X 434 , Y 388
X 350 , Y 281
X 282 , Y 167
X 199 , Y 360
X 197 , Y 434
X 159 , Y 327
Segmentation fault

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

well it was hard to find the correct spot to click on, lots of coordinates... . :(

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

Sounds like you might be trying the 64bit branch? The menu is a bit of a work in progress atm, and 64bit crashes as soon as you start the game. The 32bit build should work ok, though the menu is also a bit unfinished.

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

no actually not but i have also studied your progress in the 64-bit branch, great work!
I did compile the master branch but i think the problem has something to do with the mixed environment iḿ running.
No worries.

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

We are working on merging devilution 0.5 and then also most of the stuff in the 64-bit branch, so things should be more interesting in a weeks time :)
I'm hoping that we can get the 64bit up and running in a months time after that.

from devilutionx.

AJenbo avatar AJenbo commented on April 27, 2024

@VonKossa as you might have notice we have merged the code and things should now be in a better state, though 64bit builds currently only gets you to the loading screen. How ever you can force the compiler to 32bit mode by providing FORCE32=1 before running CMake. Hope that helps.

from devilutionx.

VonKossa avatar VonKossa commented on April 27, 2024

It did not work, the menu works as expected but if i try to start a game i am greeted with the message "out of hash space, aborted"

Thanks for your help anyway. :)

from devilutionx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.