Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#41694 closed defect (fixed)

gnome-session: build fails on Snow Leopard, getline()

Reported by: dbevans (David B. Evans) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager)
Port: gnome-session

Description

gnome-session builds without error on Lion and up but fails on Snow Leopard with this error:

/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc-4.2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs  -pipe -Os -Wno-format-nonliteral -arch x86_64  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o gnome-session-inhibit gnome_session_inhibit-gnome-session-inhibit.o -L/opt/local/lib -ldbus-glib-1 -ldbus-1 -lupower-glib -ljson-glib-1.0 -lgnome-desktop-3 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfontconfig -lfreetype -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
gnome-session-check-accelerated-helper.c: In function ‘_is_gl_renderer_blacklisted’:
gnome-session-check-accelerated-helper.c:169: warning: implicit declaration of function ‘getline’
gnome-session-check-accelerated-helper.c:169: warning: nested extern declaration of ‘getline’
mv -f .deps/gnome_session_check_accelerated-gnome-session-check-accelerated.Tpo .deps/gnome_session_check_accelerated-gnome-session-check-accelerated.Po
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc-4.2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs  -pipe -Os -Wno-format-nonliteral -arch x86_64  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o gnome-session-check-accelerated gnome_session_check_accelerated-gnome-session-check-accelerated.o -L/opt/local/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfontconfig -lfreetype -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl  -L/opt/local/lib -lX11
mv -f .deps/gnome_session_check_accelerated_helper-gnome-session-check-accelerated-helper.Tpo .deps/gnome_session_check_accelerated_helper-gnome-session-check-accelerated-helper.Po
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc-4.2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs  -pipe -Os -Wno-format-nonliteral -arch x86_64  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o gnome-session-check-accelerated-helper gnome_session_check_accelerated_helper-gnome-session-check-accelerated-helper.o -L/opt/local/lib -lXcomposite -lGL -lglib-2.0 -lintl  -L/opt/local/lib -lX11
libtool: link: /usr/bin/gcc-4.2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -pipe -Os -Wno-format-nonliteral -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -o gnome-session-check-accelerated-helper gnome_session_check_accelerated_helper-gnome-session-check-accelerated-helper.o  -L/opt/local/lib /opt/local/lib/libXcomposite.dylib /opt/local/lib/libxcb.dylib /opt/local/lib/libXau.dylib /opt/local/lib/libXdmcp.dylib -lGL /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libX11.dylib
Undefined symbols:
  "_getline", referenced from:
      _main in gnome_session_check_accelerated_helper-gnome-session-check-accelerated-helper.o
ld: symbol(s) not found

I've been staring at this for a while now and AFAICT getline has been available in since Mac OS X 10.7, is defined in stdio.h in SL which is included, etc. So I must be missing something obvious.

Need a fresh set of eyes. If some one can see how to fix this let me know or just go ahead and fix it.

Thanks

Attachments (1)

build-sl.log (112.2 KB) - added by dbevans (David B. Evans) 11 years ago.
Buildbot SL log showing failure

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by dbevans (David B. Evans)

Attachment: build-sl.log added

Buildbot SL log showing failure

comment:1 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I added getline to Lion.

You'll need to add a local implementation to gnome-session on SL. I'm sure this affects other platforms, so there's probably already a bug or patch in gnome's bugzilla.

https://www.opensource.apple.com/source/Libc/Libc-997.1.1/stdio/FreeBSD/getline.c

https://www.opensource.apple.com/source/Libc/Libc-997.1.1/stdio/FreeBSD/getdelim.c

comment:2 Changed 11 years ago by dbevans (David B. Evans)

I haven't found any yet. Thanks for squaring me away. I obviously talked myself into some nonsense.

Last edited 11 years ago by dbevans (David B. Evans) (previous) (diff)

comment:3 Changed 11 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Tentative fix using private getline(), getdelim() on 10.6 and earlier committed in r114312. Builds but needs more testing particularly on SL.

comment:4 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.