Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora: Unable to find XShm.h #591

Closed
scottchiefbaker opened this issue Jan 23, 2019 · 15 comments
Closed

Fedora: Unable to find XShm.h #591

scottchiefbaker opened this issue Jan 23, 2019 · 15 comments

Comments

@scottchiefbaker
Copy link
Contributor

I'm trying to build on Fedora and getting an error about XShm.h being missing.

In file included from platform/linux/acpllnx.cpp:23:
/usr/include/xalleg.h:38:10: fatal error: X11/extensions/XShm.h: No such file or directory
#include <X11/extensions/XShm.h>
        ^~~~~~~~~~~~~~~~~~~~~~~

I'm not sure what package I should be installing on Fedora to get this library. Any ideas?

@jdiperla
Copy link

jdiperla commented Jan 24, 2019 via email

@scottchiefbaker
Copy link
Contributor Author

I had to install both libXext-devel and libXxf86vm-devel. I'll update the Fedora compile docs as soon as I get this working.

Now I'm getting:

/usr/bin/ld: ../Common/libsrc/aastr-0.1.1/AAROT.o: in function `_aa_rotate_bitmap':
/home/bakers/github/ags/Engine/../Common/libsrc/aastr-0.1.1/AAROT.c:88: undefined reference to `fsin'
/usr/bin/ld: /home/bakers/github/ags/Engine/../Common/libsrc/aastr-0.1.1/AAROT.c:89: undefined reference to `fcos'
collect2: error: ld returned 1 exit status

@ghost
Copy link

ghost commented Jan 24, 2019

fsin and fcos are part of Allegro 4 API.

UPD: they WERE part of Allegro API, until this: liballeg/allegro5@4848f15

What version of Allegro are you using?
Probably we will have to update our code to the new version of Allegro (although it is not officially released yet).

@scottchiefbaker
Copy link
Contributor Author

scottchiefbaker commented Jan 24, 2019

allegro-devel-4.4.2-21.fc29.x86_64

Allegro 5 is available in the repos also. Should I try that?

@ghost
Copy link

ghost commented Jan 24, 2019

No, Allegro 5 is totally different and not compatible.

Can you check that the code shown in the commit linked above still exists in allegro header?

@scottchiefbaker
Copy link
Contributor Author

/usr/include/allegro/alcompat.h does indeed contain that entire #ifdef ALLEGRO_FIX_ALIASES block.

@ghost
Copy link

ghost commented Jan 24, 2019

Hmm, well, then either ALLEGRO_NO_FIX_ALIASES is defined, or the header does not get included into the given *.c file for some reason.

I am still not fully sure how these functions are included normally, I'll try to investigate a bit more.

@ghost
Copy link

ghost commented Jan 24, 2019

Alright, we actually have these aliases disabled in the latest ags3 and master branches: 44d9544
Not the best way to disable them right in code like that though, should be moved to makefile/msvs project config.
fcos and fsin in AAROT.c should be changed to fixcos and fixsin as suggested.

It's curious, that AAROT.c is actually not used by the engine, and is only linked to non-Windows ports.

@scottchiefbaker
Copy link
Contributor Author

Aha... that makes sense now. If you land a fix for this let me know. I'll git pull and try the build again.

I'll update the Fedora compile instructions with a PR when this is all done.

@scottchiefbaker
Copy link
Contributor Author

It's been a while since I've messed around with AGS. Should I be using master or the ags3 branch. Can you explain the diff to me?

@ghost
Copy link

ghost commented Jan 24, 2019

If you land a fix for this let me know.

I will make a PR soon.

It's been a while since I've messed around with AGS. Should I be using master or the ags3 branch. Can you explain the diff to me?

The difference is explained in the readme, starting from here: https://github.com/adventuregamestudio/ags#contributing
In more detail: #448 , #450

Right now the "master" branch contains future version which is called "ags4" (working title). But it does not have any actual release plan or date. This is open for suggestions.

"ags3" is developed more actively at the moment and we will be releasing v3.5.0 in a while.
Note, that this was not really in plans when this ags3/ags4 split occured, so some of older tickets mention that ags3 won't be developed any further... which is no longer true.

All changes from "ags3" are being merged to master (ags4).

@scottchiefbaker
Copy link
Contributor Author

scottchiefbaker commented Jan 24, 2019

I enabled ALLEGRO_FIX_ALIASES and it gets a lot closer to finishing compiling, but I'm getting a new error about a duplicate function definition now:

In file included from /usr/include/allegro/base.h:41,
                from /usr/include/allegro.h:25,
                from ../Common/util/wgt2allg.h:30,
                from ../Engine/ac/draw.h:26,
                from ac/dynamicsprite.cpp:19:
/usr/include/allegro/alcompat.h:44:7: error: conflicting declaration of C function ‘fixed fadd(fixed, fixed)’
    AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y))

@ghost
Copy link

ghost commented Jan 24, 2019

This is why these aliases were disabled in the first place: iirc same function names are also declared in standard library. You are going into opposite direction enabling it back.

@ghost
Copy link

ghost commented Jan 24, 2019

I opened pull request, could you try it out? #594

@scottchiefbaker
Copy link
Contributor Author

This should be fixed once the doc update in #595 is landed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants