ferdymercury / amide

AMIDE: a Medical Imaging Data Examiner
http://amide.sourceforge.net/
GNU General Public License v2.0
19 stars 12 forks source link

make dist fails #18

Closed enlf-dev closed 1 year ago

enlf-dev commented 2 years ago

I hoped to send 1.0.6 source distributions along side the windows installers, however any variant of 'make dist' currently fails with some errors.

... lots of "undefined references" like

C:/BUILD/amide64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\BUILD\amide64\home\ewn\project\amide\amide-current\doc\reference/amitk-scan.c:121: undefined reference to `amitk_object_dialog_get_type'

... ending in ...
make[6]: *** [Makefile:807: scan-build.stamp] Error 1
make[6]: Leaving directory '/home/ewn/project/amide/amide-current/doc/reference'
make[5]: *** [Makefile:619: distdir] Error 2
make[5]: Leaving directory '/home/ewn/project/amide/amide-current/doc/reference'
make[4]: *** [Makefile:533: distdir-am] Error 1
...
ferdymercury commented 2 years ago

Did you solve the issue? If yes, how? Thanks!

enlf-dev commented 2 years ago

Unfortenately no. Apparently it was already broken in 1.0.5, so not specifically 1.0.6 related; as I initially assumed.

As workaround I tarred my msys2 build source and could succesfully compile that on Ubuntu 20 and ArchLabs 2021. So I send that tar file to Andy, in case he would like to upload it on SF.

ferdymercury commented 2 years ago

In Ubuntu18, with flag --disable-doc, I get this error:

/usr/bin/ld: ../../src/dcmtk_interface.o: undefined reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ferdymercury commented 2 years ago

The following workaround deactivating gtkdoc works for me, the dist tgz is created. Can you check on Windows?

git clean -xfd
cd amide-current
intltoolize
libtoolize
gnome-doc-prepare
touch gtk-doc.make
autoreconf --install
./configure
make
make dist
enlf-dev commented 2 years ago

It fails around linking "amitk-scan.exe" with several of those "undefined reference to" problems.

ferdymercury commented 2 years ago

hmm can you try removing line 21 https://github.com/ferdymercury/amide/blob/main/amide-current/Makefile.am#L21 and see if it works then?

Side note: issue is probably related with wildcards not being properly understood by automake: https://github.com/ferdymercury/amide/issues/19

enlf-dev commented 2 years ago

No, it didn't work. Same failures. The doc/README is clear that it doesn't built well as of 2012 when libdcmdata support was configured in.

What is more: clean start and disabling libdcmdata even breaks the linking of amide.exe ... with the same "undefined reference to" errors related to the libdcmdata (dcmtk) library.

enlf-dev commented 2 years ago

Trashing all libs to dcmtk still insists on linking -ldcmimage, -ldcmjpeg -lijg8 and so on. I believe the crux must be there. The libdcmdata isn't totally disabled via the configure.

enlf-dev commented 2 years ago

After some tweaking I can get a sources tgz file. However, it can't be used to build. Bails out with an error: "No rule to make target 'align_pt.h' which seems to be missing in pixmaps. Can your tgz sources file be used to build?

ferdymercury commented 2 years ago

Same issue here, it was broken.

I think it should be fixed with: https://github.com/ferdymercury/amide/commit/605b9d997be8ea6a3121ae53020ec663eea29967

enlf-dev commented 2 years ago

For the folder pixmap it seems fixed. Here on msys2 it fails somehow similar for the folder win32. "No rule to make target 'amide_logo16x16.png', needed by 'amide.ico'."

Ps: I tried plenty of combinations and tweaks to get 'make dist' work with dcmtk included but no luck ... doc/reference folder always kept halting the proces somehow.

ferdymercury commented 2 years ago

For msys2, can you try now with: https://github.com/ferdymercury/amide/tree/win32 ?

Thanks

ferdymercury commented 2 years ago

Thanks for https://github.com/ferdymercury/amide/pull/20#event-6824083196

Does it finish now or are there new problems?

enlf-dev commented 2 years ago

A 'make dist' now does creates a compilable tgz file. The prerequisites for creating a tgz file are (1) docs enabled and (2) libdcmdata disabled.

A 'make distclean' however breaks a rebuild: for example pixmaps/*.h files are deleted. Will open that as another issue?

ferdymercury commented 2 years ago

Thanks for checking! Yes, a separate issue for distclean would be convenient.

enlf-dev commented 2 years ago

Seems created .h header files in pixmaps don't belong in EXTRA_DIST. A pull request with an updated Makefile.am will follow.

ferdymercury commented 1 year ago

I guess this was solved by https://github.com/ferdymercury/amide/commit/605b9d997be8ea6a3121ae53020ec663eea29967 and https://github.com/ferdymercury/amide/pull/20