Giter VIP home page Giter VIP logo

Comments (11)

rofl0r avatar rofl0r commented on May 20, 2024

gtk3 version uses meson.
gtk2 version uses autotools.
pick your poison

from desmume.

andykimpe avatar andykimpe commented on May 20, 2024

except that since you put the source code in a subfolder

can't use meson in deb packaging

for packaging in meson the source code must be at the root of the project and not in subfolders

the meson plugin for deb packaging does not allow you to work in subfolders

otherwise either said it is wrong or put all the source code back to the root as with 0.9.11

either make it work with autotools

it is because of this that on the official ubuntu and debian repositories

the version available and always 0.9.11 and not 0.9.13

because it is impossible to compile packages with the code as you currently provide it

latest version available for debian 0.9.11

https://packages.debian.org/search?keywords=desmume

for ubuntu 0.9.11

https://packages.ubuntu.com/search?keywords=desmume

As long as this problem is not resolved it will be impossible to have packages in versions more recent than 0.9.11 on this distribution.

from desmume.

zeromus avatar zeromus commented on May 20, 2024

we will not move the source files.
edit your build scripts to mv the sources before attempting to build them.

from desmume.

amidevous avatar amidevous commented on May 20, 2024

read debhelper full man

https://man7.org/linux/man-pages/man7/debhelper.7.html

BUILD SYSTEM OPTIONS         [top](https://man7.org/linux/man-pages/man7/debhelper.7.html#top_of_page)

       The following command line options are supported by all of the
       dh_auto_* debhelper programs. These programs support a variety of
       build systems, and normally heuristically determine which to use,
       and how to use them.  You can use these command line options to
       override the default behavior.  Typically these are passed to
       [dh(1)](https://man7.org/linux/man-pages/man1/dh.1.html), which then passes them to all the dh_auto_* programs.

       -Sbuildsystem, --buildsystem=buildsystem
           Force use of the specified buildsystem, instead of trying to
           auto-select one which might be applicable for the package.

           Pass none as buildsystem to disable auto-selection.

       -Ddirectory, --sourcedir=directory, --sourcedirectory=directory
           Assume that the original package source tree is at the
           specified directory rather than the top level directory of
           the Debian source package tree.

           Warning: The --sourcedir variant matches a similar named
           option in dh_install and dh_missing (etc.) for historical
           reasons.  While they have a similar name, they have very
           distinct purposes and in some cases it can cause errors when
           this variant is passed to dh (when then passes it on to all
           tools).

       -B[directory], --builddir[=directory],
       --builddirectory[=directory]
           Enable out of source building and use the specified directory
           as the build directory. If directory parameter is omitted, a
           default build directory will be chosen.

           If this option is not specified, building will be done in
           source by default unless the build system requires or prefers
           out of source tree building.  In such a case, the default
           build directory will be used even if --builddirectory is not
           specified.

           If the build system prefers out of source tree building but
           still allows in source building, the latter can be re-enabled
           by passing a build directory path that is the same as the
           source directory path.

try this in file

debian/rules

#!/usr/bin/make -f

LDFLAGS+=-Wl,-z,defs -Wl,--as-needed
#export LDFLAGS

%:
	dh $@ --buildsystem=meson --sourcedir=desmume/src/frontend/posix --builddir=desmume/src/frontend/posix/build


from desmume.

andykimpe avatar andykimpe commented on May 20, 2024

ok but that doesn't seem to work either

../../../commandline.cpp: In member function ‘bool CommandLine::parse(int, char**)’:
../../../commandline.cpp:400:21: error: format not a string literal and no format arguments [-Werror=format-security]
  400 |   printf(help_string);
      |                     ^
../../../commandline.cpp: In member function ‘void CommandLine::errorHelp(const char*)’:
../../../commandline.cpp:34:52: error: format not a string literal and no format arguments [-Werror=format-security]
   34 | #define printerror(...) fprintf(stderr, __VA_ARGS__)
      |                                                    ^
../../../commandline.cpp:574:2: note: in expansion of macro ‘printerror’
  574 |  printerror(help_string);
      |  ^~~~~~~~~~
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd desmume/src/frontend/posix/build && LC_ALL=C.UTF-8 ninja -j1 -v returned exit code 1
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

from desmume.

zeromus avatar zeromus commented on May 20, 2024

Reconfigure your build environment to not have "some warnings being treated as errors"

from desmume.

andykimpe avatar andykimpe commented on May 20, 2024

even adding your patch

https://github.com/TASEmulators/desmume/commit/6508c2b115f954afece4243e36e9e35e1d459ea8.patch

it's still in error

FAILED: desmume@sta/.._.._commandline.cpp.o 
c++ -Idesmume@sta -I. -I.. -I../../../../src -I../../../../src/libretro-common/include -I../../../../src/frontend -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/SDL2 -I/usr/include -I/usr/include/AL -I/usr/include/soundtouch -I/usr/include/agg2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++14 -DHAVE_JIT -DHOST_64 -DHAVE_LIBSOUNDTOUCH -DHAVE_LIBAGG -g -O2 -fdebug-prefix-map=/root/desmume-source/desmume-release_0_9_13=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -D_REENTRANT -MD -MQ 'desmume@sta/.._.._commandline.cpp.o' -MF 'desmume@sta/.._.._commandline.cpp.o.d' -o 'desmume@sta/.._.._commandline.cpp.o' -c ../../../commandline.cpp
../../../commandline.cpp: In member function ‘bool CommandLine::parse(int, char**)’:
../../../commandline.cpp:400:21: error: format not a string literal and no format arguments [-Werror=format-security]
  400 |   printf(help_string);
      |                     ^
../../../commandline.cpp: In member function ‘void CommandLine::errorHelp(const char*)’:
../../../commandline.cpp:34:52: error: format not a string literal and no format arguments [-Werror=format-security]
   34 | #define printerror(...) fprintf(stderr, __VA_ARGS__)
      |                                                    ^
../../../commandline.cpp:574:2: note: in expansion of macro ‘printerror’
  574 |  printerror(help_string);
      |  ^~~~~~~~~~
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd desmume/src/frontend/posix/build && LC_ALL=C.UTF-8 ninja -j1 -v returned exit code 1
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

from desmume.

andykimpe avatar andykimpe commented on May 20, 2024

for information I use ubuntu 22.04 jammy LTS

if you are not on this distribution

you can use pbuilder

for pbuilder information and available on all official repositories of debian ubuntu and fedora distributions as well as on epel for redhat

sudo pbuilder create --distribution jammy --architecture amd64 \
--components "main restricted universe multiverse" \
--mirror "http://archive.ubuntu.com/ubuntu" \
--othermirror "deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse|deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse|deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse|deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse|deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" \
--extrapackages "ubuntu-minimal net-tools debhelper cdbs lintian build-essential fakeroot devscripts dh-make dput libglade2-dev libgtk2.0-dev libsdl1.2-dev libosmesa6-dev libagg-dev intltool quilt libgtkglext1-dev libtinyxml-dev libsoundtouch-dev dh-autoreconf meson libsdl2-dev libpcap-dev libgtk-3-dev cmake libopenal-dev wget nano"

sudo pbuilder login

cd /root

wget https://github.com/TASEmulators/desmume/archive/refs/tags/release_0_9_13.tar.gz -O desmume_0.9.13.orig.tar.gz

tar -xvf desmume_0.9.13.orig.tar.gz

cd desmume-release_0_9_13

mkdir -p debian/patches

mkdir -p debian/source

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/6508c2b115f954afece4243e36e9e35e1d459ea8.patch" -O debian/patches/6508c2b115f954afece4243e36e9e35e1d459ea8.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/desmume-0.9.13-aarch64.patch" -O debian/patches/desmume-0.9.13-aarch64.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/desmume-0.9.13-arm.patch" -O debian/patches/desmume-0.9.13-arm.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/desmume-0.9.13-formatstring.patch" -O debian/patches/desmume-0.9.13-formatstring.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/desmume-0.9.13-ppc64le.patch" -O debian/patches/desmume-0.9.13-ppc64le.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/desmume-0.9.13-tinyxml.patch" -O debian/patches/desmume-0.9.13-tinyxml.patch

wget "https://github.com/andykimpe/desmume/raw/master/debian/patches/series" -O debian/patches/series

wget "https://github.com/andykimpe/desmume/raw/master/debian/source/format" -O debian/source/format

wget "https://github.com/andykimpe/desmume/raw/master/debian/NEWS" -O debian/NEWS

wget "https://github.com/andykimpe/desmume/raw/master/debian/README.Debian" -O debian/README.Debian

wget "https://github.com/andykimpe/desmume/raw/master/debian/README.source" -O debian/README.source

wget "https://github.com/andykimpe/desmume/raw/master/debian/changelog" -O debian/changelog

wget "https://github.com/andykimpe/desmume/raw/master/debian/compat" -O debian/compat

wget "https://github.com/andykimpe/desmume/raw/master/debian/control" -O debian/control

wget "https://github.com/andykimpe/desmume/raw/master/debian/copyright" -O debian/copyright

wget "https://github.com/andykimpe/desmume/raw/master/debian/rules" -O debian/rules

wget "https://github.com/andykimpe/desmume/raw/master/debian/watch" -O debian/watch

debuild

you can see it's still the same

please help to solve it

from desmume.

amidevous avatar amidevous commented on May 20, 2024

I have the impression that the patch provided by zeromus is not applied correctly

can you check if they are applied in the file when the build gives you this error

from desmume.

andykimpe avatar andykimpe commented on May 20, 2024

actually it was not applied never put 9 in the compat except debhelper 9 and clearly obsolete

andykimpe@4d6e92d

but it gives an error

../../../NDSSystem.h:595:26: warning:   ‘NDS_CONSOLE_TYPE TCommonSettings::ConsoleType’ [-Wreorder]
  595 |         NDS_CONSOLE_TYPE ConsoleType;
      |                          ^~~~~~~~~~~
../../../NDSSystem.h:500:9: warning:   when initialized here [-Wreorder]
  500 |         TCommonSettings()
      |         ^~~~~~~~~~~~~~~
../../../NDSSystem.h:653:13: warning: ‘TCommonSettings::SPU_sync_method’ will be initialized after [-Wreorder]
  653 |         int SPU_sync_method;
      |             ^~~~~~~~~~~~~~~
../../../NDSSystem.h:631:13: warning:   ‘int TCommonSettings::WifiBridgeDeviceID’ [-Wreorder]
  631 |         int WifiBridgeDeviceID;
      |             ^~~~~~~~~~~~~~~~~~
../../../NDSSystem.h:500:9: warning:   when initialized here [-Wreorder]
  500 |         TCommonSettings()
      |         ^~~~~~~~~~~~~~~
In file included from ../../../arm_instructions.cpp:33:
../../../MMU.h: At global scope:
../../../MMU.h:88:7: warning: ‘class TRegister_32’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
   88 | class TRegister_32
      |       ^~~~~~~~~~~~
../../../MMU.h:120:8: warning: base class ‘class TRegister_32’ has accessible non-virtual destructor [-Wnon-virtual-dtor]
  120 | struct TGXSTAT : public TRegister_32
      |        ^~~~~~~
../../../MMU.h:120:8: warning: ‘struct TGXSTAT’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
../../../MMU.h:241:15: warning: base class ‘class TRegister_32’ has accessible non-virtual destructor [-Wnon-virtual-dtor]
  241 |         class AddressRegister : public TRegister_32 {
      |               ^~~~~~~~~~~~~~~
../../../MMU.h:241:15: warning: ‘class DmaController::AddressRegister’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
../../../MMU.h:257:15: warning: base class ‘class TRegister_32’ has accessible non-virtual destructor [-Wnon-virtual-dtor]
  257 |         class ControlRegister : public TRegister_32 {
      |               ^~~~~~~~~~~~~~~
../../../MMU.h:257:15: warning: ‘class DmaController::ControlRegister’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd desmume/src/frontend/posix/build && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

from desmume.

amidevous avatar amidevous commented on May 20, 2024

I think the problem comes from the flags used by debian and ubuntu

in manual its build and if we delete them too
try like that

debian/rules

#!/usr/bin/make -f
LDFLAGS=""
export LDFLAGS
CFLAGS=""
export CFLAGS
FFLAGS=""
export FFLAGS
FCFLAGS=""
export FCFLAGS
DEB_CFLAGS_SET=""
export DEB_CFLAGS_SET
DEB_CXXFLAGS_SET=""
export DEB_CXXFLAGS_SET
DEB_FFLAGS_SET=""
export DEB_FFLAGS_SET
DEB_FCFLAGS_SET="" 
export DEB_FCFLAGS_SET
DEB_LDFLAGS_SET=""
export DEB_LDFLAGS_SET


%:
	dh $@ --buildsystem=meson --sourcedir=desmume/src/frontend/posix --builddir=desmume/src/frontend/posix/build

I don't know if this is the right solution but in any case it's a solution that works.

  dh_strip -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
8d0d5dad0f775be1bbbf9b46a7fc65466e2d48e2
69071d7faf3e450337f32aa69a488246fe6fc435
   dh_makeshlibs -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
   dh_shlibdeps -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
   dh_installdeb -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
   dh_gencontrol -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
   dh_md5sums -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
   dh_builddeb -O--buildsystem=meson -O--sourcedir=desmume/src/frontend/posix -O--builddir=desmume/src/frontend/posix/build
dpkg-deb: building package 'desmume' in '../desmume_0.9.13-3build2_amd64.deb'.
dpkg-deb: building package 'desmume-dbgsym' in 'debian/.debhelper/scratch-space/build-desmume/desmume-dbgsym_0.9.13-3build2_amd64.deb'.
	Renaming desmume-dbgsym_0.9.13-3build2_amd64.deb to desmume-dbgsym_0.9.13-3build2_amd64.ddeb
 dpkg-genbuildinfo -O../desmume_0.9.13-3build2_amd64.buildinfo
 dpkg-genchanges -O../desmume_0.9.13-3build2_amd64.changes
dpkg-genchanges: info: including full source code in upload
dpkg -i ../desmume_0.9.13-3build2_amd64.deb
Selecting previously unselected package desmume.
(Reading database ... 50400 files and directories currently installed.)
Preparing to unpack .../desmume_0.9.13-3build2_amd64.deb ...
Unpacking desmume (0.9.13-3build2) ...
Setting up desmume (0.9.13-3build2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.10.2-1) ...
find /usr -name '*desmume*'
/usr/bin/desmume-cli
/usr/bin/desmume
/usr/share/applications/org.desmume.DeSmuME.desktop
/usr/share/man/man1/desmume-cli.1.gz
/usr/share/man/man1/desmume.1.gz
/usr/share/doc/desmume
/usr/share/metainfo/org.desmume.DeSmuME.metainfo.xml
/usr/share/icons/hicolor/scalable/apps/org.desmume.DeSmuME.svg

from desmume.

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.