Compile on NetBSD ?

Added by Adrien2002 about 1 month ago

Hello there,

I am making a pkgsrc package (in case you want to know what it is http://pkgsrc.org/ ) of etlegacy. I am at the building part but I have this.

Since I’m still a beginner in compilation, I don’t know what is it about so I come here to ask for your help. I attached the output.

err - Output of compilation (13.5 KB)


Replies (7)

RE: Compile on NetBSD ? - Added by Adrien2002 about 1 month ago

Yeah ! Indeed it worked.

But now I’m in front of a new problem. Let me explain you. On GNU/Linux, libdl.so is a file but in NetBSD, it is not a file. It exists but as a part of the project, not as a file.

On my pcsx2 package, I added this in my Makefile :

CMAKE_ARGS+= -Dlibdl=${DL_LIBS}

And it did the trick but here in etlegacy, CMAKE will ignore that line and will complain while building etlded. I should find another way to tell etlegacy that we have libdl our way.

– Adding WolfAdmin to installer scripts
– Configuring done
– Generating done
CMake Warning:
Manually-specified variables were not used by the project:

libdl

– Build files have been written to: /usr/pkgsrc/wip/etlegacy/work/etlegacy
⇒ Rewrite cmake Dependencies files

RE: Compile on NetBSD ? - Added by Adrien2002 about 1 month ago

Thank you very much, it went farther but still stop on a new error

Let me show you the new error.

err (77 KB)

RE: Compile on NetBSD ? - Added by IR4T4 30 days ago

Adrien2002 wrote:

Thank you very much, it went farther but still stop on a new error

What a surprise As far as I can see you are using sdl2 from NetBSD. Where is the SDL2 header file located on your system (SDL.h)?
In /usr/include/SDL2/? Keep in mind this file is part of the SDL dev package libsdl2-dev. It’s required.

In case of the header file is available open ETL file cmake/ETL_SetupFeatures.cmake
Jump to line 49 and add (as it’s done for BUNDLED_SDL):

add_definitions(-DHAVE_SDL) # for tinygettext

I don’t want to add it to the repo because it’s a bit odd other NOT BUNDLED SDL builds don’t run into this trouble.

You should also fix this: "The zip executable has not been found. The pk3 creation will be skipped." Install zip.

RE: Compile on NetBSD ? - Added by Adrien2002 28 days ago

What a surprise As far as I can see you are using sdl2 from NetBSD. Where is the SDL2 header file located on your system (SDL.h)?

/usr/pkg/include/SDL2/SDL.h
It’s not a SO different behavior from other BSD. On FreeBSD, the prefix will be /usr/local. On NetBSD, it is /usr/pkg

Keep in mind this file is part of the SDL dev package libsdl2-dev. It’s required.

It’s not GNU/Linux, it’s not working like that. I’m using pkgsrc, I just have to add ".include "../../devel/SDL2/buildlink3.mk"" into the pkgsrc’s Makefile of etlegacy package and it will know where to find the headers. So we don’t have *-dev packages since our packages provides both libs and headers

I don’t want to add it to the repo because it’s a bit odd other NOT BUNDLED SDL builds don’t run into this trouble.

It’s ok ! I can make it a patch for pkgsrc
Come to think of it, does it also happen on FreeBSD (since it’s also using a prefix) ?

You should also fix this: "The zip executable has not been found. The pk3 creation will be skipped." Install zip.

You are right, it’s done now.

Actually, the build still stops a little bit farther... Your line worked for me so I made a pkgsrc patch for it.
Now it’s something about minizip

err (49.5 KB)

RE: Compile on NetBSD ? - Added by IR4T4 28 days ago

Disable USE_AES for lib minizip. Our bundled minizip doesn’t contain the encrpytion parts of this lib.

Edit: You don’t have to add this "-DHAVE_SDL" definition. See https://github.com/etlegacy/etlegacy/commit/c30b9198d5b18d6c4f71dabd3fb8766006ab86f1

(1-7/7)