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

Ubuntu Debian 0.9.13 no build in autotools and glade #768

Open
andykimpe opened this issue Jan 31, 2024 · 11 comments
Open

Ubuntu Debian 0.9.13 no build in autotools and glade #768

andykimpe opened this issue Jan 31, 2024 · 11 comments

Comments

@andykimpe
Copy link

andykimpe commented Jan 31, 2024

Ubuntu and Debian require build with gtk3 with autoconf for build 0.9.13

you build not work please solve

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
pushd desmume/src/frontend/posix
./autogen.sh
./configure --prefix=/usr --bindir=/usr/games --datadir=/usr/share/games \
                        --enable-gdb-stub \
                        --enable-osmesa \
                        --enable-glade
make

if errorplease sovel

ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libdesmume.a
make[1]: Leaving directory '/root/desmume-release_0_9_13/desmume/src/frontend/posix'
Making all in gtk-glade
make[1]: Entering directory '/root/desmume-release_0_9_13/desmume/src/frontend/posix/gtk-glade'
Making all in doc
make[2]: Entering directory '/root/desmume-release_0_9_13/desmume/src/frontend/posix/gtk-glade/doc'
make[2]: *** No rule to make target 'desmume-glade.1', needed by 'all-am'.  Stop.
make[2]: Leaving directory '/root/desmume-release_0_9_13/desmume/src/frontend/posix/gtk-glade/doc'
make[1]: *** [Makefile:695: all-recursive] Error 1
make[1]: Leaving directory '/root/desmume-release_0_9_13/desmume/src/frontend/posix/gtk-glade'
make: *** [Makefile:1801: all-recursive] Error 1
~/desmume-release_0_9_13
@andykimpe andykimpe changed the title Ubuntu Debian 0.9.13 no build Ubuntu Debian 0.9.13 no build with autotools and glade Jan 31, 2024
@andykimpe andykimpe changed the title Ubuntu Debian 0.9.13 no build with autotools and glade Ubuntu Debian 0.9.13 no build in autotools and glade Jan 31, 2024
@rofl0r
Copy link
Collaborator

rofl0r commented Jan 31, 2024

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

@andykimpe
Copy link
Author

andykimpe commented Feb 1, 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.

@zeromus
Copy link
Contributor

zeromus commented Feb 1, 2024

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

@amidevous
Copy link

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


@andykimpe
Copy link
Author

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

@zeromus
Copy link
Contributor

zeromus commented Feb 1, 2024

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

@andykimpe
Copy link
Author

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

@andykimpe
Copy link
Author

andykimpe commented Feb 1, 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

@amidevous
Copy link

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

@andykimpe
Copy link
Author

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

@amidevous
Copy link

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

getItemFromBlock pushed a commit to getItemFromBlock/AM64DS_DeSmuME that referenced this issue Feb 28, 2024
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

4 participants