gschem >1.7.2 won't build in Cygwin

Bug #1258217 reported by Geoffrey Yerem
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gEDA
Triaged
Medium
Peter TB Brett

Bug Description

Hello,
I was recently trying to build gschem 1.7.2, 1.8.2, and 1.9.0 in Cygwin and got the following error:

...

make[4]: Entering directory '/cygdrive/c/Users/Geoffery/Downloads/Programs/geda-gaf-1.9.0/gaf'

...

~/geda-gaf-1.9.0/libgeda/src/o_picture.c:948: undefined reference to `g_input_stream_get_type'
~/geda-gaf-1.9.0/libgeda/src/o_picture.c:948: undefined reference to `g_memory_input_stream_new_from_data'
collect2: error: ld returned 1 exit status
Makefile:554: recipe for target 'gaf.exe' failed
make[4]: *** [gaf.exe] Error 1
make[4]: Leaving directory '/cygdrive/c/Users/Geoffery/Downloads/Programs/geda-gaf-1.9.0/gaf'

...

I followed the advice in the following mail:

http://comments.gmane.org/gmane.comp.cad.geda.user/41555

> Arnaud Gardelein | 21 May 2013 16:22
> [geda-user] Installation of geda-gaf-1.8.1 on cygwin
>
> This error occurred when installing geda-gaf-1.8.1 on cygwin:
> ../../libgeda/src/.libs/libgeda.a(libgeda_la-o_picture.o): In function
> `o_picture_set_from_buffer':
> /tmp/geda-gaf-1.8.1/libgeda/src/o_picture.c:1133: undefined reference to
> `_g_input_stream_get_type'
> /tmp/geda-gaf-1.8.1/libgeda/src/o_picture.c:1133: undefined reference to
> `_g_memory_input_stream_new_from_data'
>
> It happened for in those directories:
> libgeda/shell
> gschem/src
> gattrib/src
> gsymcheck/src
> gnetlist/src
> utils/gschlas
>
> It seems that appending /usr/lib/libgio-2.0.dll.a to *_LDADD in related
> Makefile.am solve the issue.
>
> I hope this help.
> Arnaud.

and I was able to get it to build correctly.

The bug seems to have been introduced in 1.7.2 because is doesn't show up when I try to build 1.7.1.

Thanks.

Geoffrey

Peter TB Brett (peter-b)
Changed in geda:
importance: Undecided → Medium
status: New → Incomplete
milestone: none → 1.9.2
assignee: nobody → Peter TB Brett (peter-b)
milestone: 1.9.2 → none
Revision history for this message
Peter TB Brett (peter-b) wrote :

Hi Geoffrey,

I'm not able to get a Cygwin build environment up and running at the moment, but if I posted some patches here, would you be able to test them for me, please?

Thanks :-)

Revision history for this message
Geoffrey Yerem (gyerem) wrote : Re: [Bug 1258217] Re: gschem >1.7.2 won't build in Cygwin

Hi Peter,
 I think I can, but I won't be able to get to it until Tuesday.
Geoffrey

On 3/16/2014 2:52 PM, Peter TB Brett wrote:
> Hi Geoffrey,
>
> I'm not able to get a Cygwin build environment up and running at the
> moment, but if I posted some patches here, would you be able to test
> them for me, please?
>
> Thanks :-)
>

Revision history for this message
Peter TB Brett (peter-b) wrote :

I've now reproduced this bug. I'll fix it ASAP and make sure that the fix is included in 1.9.3.

Changed in geda:
status: Incomplete → Triaged
milestone: none → 1.9.2
Revision history for this message
Peter TB Brett (peter-b) wrote :
Download full text (5.3 KiB)

This is officially a really weird bug.

- I have got libgio headers installed, because the source files that use gio.h compile fine.
- I have got libgio linker library installed: /usr/lib/libgio-2.0.dll.a exists.
- I have got libgio DLL installed: /usr/bin/cyggio-2.0-0.dll exists.
- I am passing -lgio-2.0 to the linker.

Relevant make output:

/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -I/home/janneke/vc/gub/target/cygwin/root/usr/include -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/harfbuzz -D_REENTRANT -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -g -O2 -L/home/janneke/vc/gub/target/cygwin/root/usr/lib -L/home/janneke/vc/gub/target/cygwin/root/usr/bin -L/home/janneke/vc/gub/target/cygwin/root/usr/lib/w32api -lguile -lgmp -lcrypt -lm -lltdl -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lgio-2.0 -lXfixes -lcairo -lpixman-1 -lxcb-shm -lxcb-render -lXrender -lXext -lX11 -lxcb -lXau -lXdmcp -lpng15 -lharfbuzz -lpango-1.0 -lm -lfontconfig -lexpat -lfreetype -lz -lbz2 -lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre -lgdk_pixbuf-2.0 -lgmodule-2.0 -lpng15 -lm -lz -lgobject-2.0 -lffi -lglib-2.0 -lintl -liconv -lpcre -lcairo -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2 -lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0 -lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -lcairo -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2 -lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0 -lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -lcairo -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2 -lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0 -lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -lcairo -lgobject-2.0 -lffi -lpixman-1 -lfontconfig -lexpat -lfreetype -lbz2 -lpng15 -lm -lz -lxcb-shm -lxcb-render -lXrender -lXext -lglib-2.0 -lintl -liconv -lpcre -lX11 -lxcb -lXau -lXdmcp -o gaf.exe gaf-gaf.o gaf-config.o gaf-export.o gaf-shell.o ../libgedacairo/libgedacairo.la ../libgeda/src/libgeda.la -lintl -lm
libtool: link: gcc -Wall -I/home/janneke/vc/gub/target/cygwin/root/usr/include -D_REE...

Read more...

Revision history for this message
Felix K (kuhlix) wrote :
Download full text (6.7 KiB)

Hi,

recently, when trying to build gEDA/gaf (up-to-date git rev. 739f94f) under Cygwin, I stumbled across this bug.

It seems that, to let libtool know that libgeda depends on libgio, -lgio-2.0 has to be specified when linking libgeda[1].

Appendix A is a patch, and appendix B is a per-word diff of the relevant commands before and after applying it. Note that under B.(2), libtool has rearranged the linking flags to correctly reflect the dependency libgeda->libgio. After applying the patch, I was able to build gEDA/gaf using the standard command sequence ("./autogen.sh && ./configure && make").

There is also the possibility to add -no-undefined to libgeda_la_LDFLAGS, which could make it easier to detect missing linker flags in the future. I hope this doesn't break something on other systems (tested under Cygwin and Debian Testing).

Felix

[1] https://www.gnu.org/software/libtool/manual/html_node/Inter_002dlibrary-dependencies.html

=== Appendix A ===
---
 libgeda/src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgeda/src/Makefile.am b/libgeda/src/Makefile.am
index fea119a..1b6357b 100644
--- a/libgeda/src/Makefile.am
+++ b/libgeda/src/Makefile.am
@@ -93,7 +93,7 @@ libgeda_la_CFLAGS = \
        $(GDK_PIXBUF_CFLAGS)
 libgeda_la_LDFLAGS = -version-info $(LIBGEDA_SHLIB_VERSION) \
        $(WINDOWS_LIBTOOL_FLAGS) $(MINGW_LDFLAGS) $(GUILE_LIBS) \
- $(GLIB_LIBS) $(GDK_PIXBUF_LIBS)
+ $(GLIB_LIBS) $(GIO_LIBS) $(GDK_PIXBUF_LIBS)
 LIBTOOL=@LIBTOOL@ --silent

 # This is used to generate boilerplate for defining Scheme functions
--
2.1.4

=== Appendix B ===
{+...+} means word added, [-...-] means word deleted

(1) When linking libgeda:
/bin/sh ../../libtool --silent --tag=CC --mode=link gcc -Wall -I/home/janneke/vc/gub/target/cygwin/root/usr/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -version-info 44:0:0 -L/home/janneke/vc/gub/target/cygwin/root/usr/lib -L/home/janneke/vc/gub/target/cygwin/root/usr/bin -L/home/janneke/vc/gub/target/cygwin/root/usr/lib/w32api -lguile -lgmp -lcrypt -lm -lltdl -lglib-2.0 -lintl -lpcre -lintl -liconv -lpcre {+-lgio-2.0 -lz -lgmodule-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lintl -lpcre -lintl -liconv -lpcre+} -lgdk_pixbuf-2.0 -lm -lgmodule-2.0 -lpng15 -lm -lz -lgobject-2.0 -lffi -lglib-2.0 -lintl -lpcre -lintl -liconv -lpcre -o libgeda.la -rpath /usr/local/lib libgeda_la-scheme_init.lo libgeda_la-scheme_smob.lo libgeda_la-scheme_toplevel.lo libgeda_la-scheme_object.lo libgeda_la-scheme_complex.lo libgeda_la-scheme_os.lo libgeda_la-scheme_page.lo libgeda_la-scheme_attrib.lo libgeda_la-scheme_config.lo libgeda_la-scheme_closure.lo libgeda_la-scheme_deprecated.lo libgeda_la-edascmhookproxy.lo libgeda_la-edascmvaluetypes.lo libgeda_la-a_basic.lo libgeda_la-edaconfig.lo libgeda_la-edaerrors.lo libgeda_la-f_basic.lo libgeda_la-g_basic.lo libgeda_la-geda_list.lo libgeda_la-g_rc.lo libgeda_la-g_register.lo libgeda_la-i_vars.lo libgeda_la-libgeda.lo libgeda_la-m_basic.lo libgeda_la-m_bounds.lo libgeda_la-m_box.lo libgeda_la-m_circle.l...

Read more...

Revision history for this message
Felix K (kuhlix) wrote :
Changed in geda:
milestone: 1.9.2 → 1.9.3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.