massung / racket-csfml

Racket bindings for CSFML
5 stars 4 forks source link

Problem updating csfml #3

Open soegaard opened 2 years ago

soegaard commented 2 years ago

Hi,

I decided to test the csfml package, but I ran into problems with csfml-libs. See below.

/Jens Axel

% raco pkg install csfml       
raco pkg install: package is already installed
  package: csfml

% raco pkg update csfml 
Resolving "csfml" via https://download.racket-lang.org/releases/7.5/catalog/
Resolving "csfml" via https://pkgs.racket-lang.org
Updating:
  csfml
Downloading repository https://github.com/massung/racket-csfml.git
The following uninstalled packages are listed as dependencies of csfml:
   csfml-libs
Would you like to install these dependencies? [Y/n/a/c/?] 
Resolving "csfml-libs" via https://download.racket-lang.org/releases/7.5/catalog/
Resolving "csfml-libs" via https://pkgs.racket-lang.org
Resolving "csfml-libs" via https://planet-compats.racket-lang.org
raco pkg update: cannot find package on catalogs
  package: csfml-libs
soegaard commented 2 years ago

I wanted to try csfml in DrRacket on an Intel mac to see if there is a difference (to the M1).

massung commented 2 years ago

I haven't yet added csfml-libs to pkgs.racket-lang.org because I can't get it to work. No matter what I seem to do, Racket and DrRacket won't find the libraries that are installed to the proper location: this is true for Linux and Mac (seems to work fine on Windows, though).

I'm likely missing some tidbit of knowledge or something.

Also, since you mentioned Intel Mac, I can't seem to get all the dylib files for that since I only have M1. If you can make a PR for the csfml-libs repo and add them that'd be awesome. It's basically just brew install csfml and then finding them.

Perhaps part of my issue is that I don't know if the library files need to keep their versions in the filename. In order to make the code work w/o symlinks I've been renaming them (e.g. libcsfml-audio.2.5.dylib -> libcsfml-audio.dylib), but putting the versions back doesn't seem to help either.

Any pointers welcome, because I'd very much like to get this to work.

massung commented 2 years ago

Also noting that for Intel mac I'd need the libsndfile dynamic library as well (needed by csfml).

soegaard commented 2 years ago

Any pointers welcome, because I'd very much like to get this to work. I am no expert - but I think it's tricky to use the brew libraries. They are linked against each other and sometimes with absolute paths, which means they can't be moved.

It is simpler to use the precompiled libraries from the SFML download page:

https://www.sfml-dev.org/download/csfml/

I expect they are compiled in such a way that they can be dropped everywhere.

massung commented 2 years ago

Sadly, the precompiled binaries for x86 are missing the network library, and there are no precompiled libraries for the M1.

soegaard commented 2 years ago

Do you think it was left out on purpose? If not, maybe we can get them to include it in their distribution.

soegaard commented 2 years ago

I just checked version 2.4.0 and the network library is included.

image
soegaard commented 2 years ago

I made an issue here:

https://github.com/SFML/CSFML/issues/171