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

Can't compile on Ubuntu 16.10 (seems related to libxml-2 dependency) #1

Closed
TiBeN opened this issue Mar 25, 2017 · 2 comments
Closed

Comments

@TiBeN
Copy link

TiBeN commented Mar 25, 2017

Hi,
i tried to compile this version of switchres since "official" 1.52 cores dump on Ubuntu 16.10 (works well up to 16.04).

But i can't compile it. Here's the output error during compilation:

ben@pc-fixe-ubuntu:~/src/15khz-arcade-pkg/vendor/switchres-1.53$ make
  GEN   version.h
  CC    config.o
  CC    xml.o
  CC    winreg.o
  CC    edid.o
  CC    util.o
  CC    monitor.o
  CC    switchres.o
  CC    xrandr.o
  CC    modeline.o
  LD    switchres
xml.o : Dans la fonction « ParseXML » :
xml.c:(.text+0x25) : référence indéfinie vers « xmlDocGetRootElement »
xml.c:(.text+0x5f) : référence indéfinie vers « xmlStrcmp »
xml.c:(.text+0x9b) : référence indéfinie vers « xmlStrcmp »
xml.c:(.text+0xae) : référence indéfinie vers « xmlGetProp »
xml.c:(.text+0xc2) : référence indéfinie vers « xmlGetProp »
xml.c:(.text+0xd4) : référence indéfinie vers « xmlGetProp »
xml.c:(.text+0xe8) : référence indéfinie vers « xmlGetProp »
xml.c:(.text+0xfa) : référence indéfinie vers « xmlGetProp »
xml.c:(.text+0x37c) : référence indéfinie vers « xmlStrcmp »
xml.o : Dans la fonction « GetGameXML » :
xml.c:(.text+0x618) : référence indéfinie vers « xmlCharStrdup »
xml.c:(.text+0x620) : référence indéfinie vers « xmlParseDoc »
xml.c:(.text+0x642) : référence indéfinie vers « xmlFreeDoc »
modeline.o : Dans la fonction « ModelineCreate » :
modeline.c:(.text+0x609) : référence indéfinie vers « round »
modeline.c:(.text+0x622) : référence indéfinie vers « round »
modeline.c:(.text+0x94a) : référence indéfinie vers « round »
modeline.c:(.text+0xb74) : référence indéfinie vers « round »
modeline.c:(.text+0xf75) : référence indéfinie vers « round »
modeline.o:modeline.c:(.text+0xfa6) : encore plus de références indéfinies suivent vers « round »
modeline.o : Dans la fonction « modeline_vesa_gtf » :
modeline.c:(.text+0x203e) : référence indéfinie vers « floor »
modeline.c:(.text+0x2137) : référence indéfinie vers « floor »
modeline.c:(.text+0x21b1) : référence indéfinie vers « floor »
modeline.c:(.text+0x228b) : référence indéfinie vers « ceil »
modeline.c:(.text+0x22c7) : référence indéfinie vers « ceil »
modeline.c:(.text+0x22e7) : référence indéfinie vers « ceil »
modeline.o : Dans la fonction « round_near » :
modeline.c:(.text+0x2317) : référence indéfinie vers « floor »
modeline.c:(.text+0x2331) : référence indéfinie vers « ceil »
collect2: error: ld returned 1 exit status
Makefile:39 : la recette pour la cible « switchres » a échouée
make: *** [switchres] Erreur 1

libxml2 and libxml2-dev` are correctly installed on the system

@TiBeN
Copy link
Author

TiBeN commented Apr 1, 2017

So i successfully compiled it by changing the argument order of the linking command on the Makefile, line 40, from:

	@$(CC) $(LDFLAGS) $(OBJECTS) -o $@

to

	@$(CC) $(OBJECTS) -o $@ $(LDFLAGS) 

Unfortunatelly the compiled swithres exec throw a Buffer overflow core dump, like switchres 1.52.

EDIT: Buffer overflow cause was because of my $PATH env var being messy, containing some paths twice. It works well now.

I don't make a pull request because i don't know enough C programming to be sure if this fix cross-compiles.

@Ansa89
Copy link
Owner

Ansa89 commented May 7, 2019

Hi @TiBeN,
thanks a lot for your interest in this project and to propose some fixes.
I already saw some similar errors (related to compiler argument order) in other projects too.

I will give this a try and maybe I will push the fix.

I'm sorry for the late reply but in the last years I had no time for my hobbies and also right now I struggle to get some spare time.
So don't expect super quick replies, but at least I'm trying to keep things moving.

@Ansa89 Ansa89 closed this as completed in a3c1beb May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants