Re: [dev] Problem building dmenu tip

From: julien steinhauser <julien.steinhauser_AT_orange.fr>
Date: Wed, 1 Dec 2010 00:19:33 +0200

On Sun, Jul 18, 2010 at 04:40:57PM -0400, Josh Rickmar wrote:
>
> I'm having the following problem when building dmenu tip on OpenBSD
> current. At first I thought it was a problem with OpenBSD, but a user
> in the irc channel said he remembers a similar problem when linking with
> ld on Linux. Any ideas?
>
> dmenu build options:
> CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/local/include -I/usr/X11R6/include -D_BSD_SOURCE -DVERSION="4.1.1"
> LDFLAGS = -s -L/usr/lib -L/usr/local/lib -lc -L/usr/X11R6/lib -lX11 -ldraw
> CC = cc
> CC dinput.c
> config.h:9: warning: 'spaceitem' defined but not used
> CC common.c
> config.h:9: warning: 'spaceitem' defined but not used
> CC -o dinput
> /usr/X11R6/lib/libX11.so.13.0: warning: strcpy() is almost always misused, please use strlcpy()
> /usr/X11R6/lib/libX11.so.13.0: warning: strcat() is almost always misused, please use strlcat()
> /usr/X11R6/lib/libX11.so.13.0: warning: sprintf() is often misused, please use snprintf()
> /usr/lib/crt0.o(.text+0x9d): In function `___start':
> : undefined reference to `main'
> collect2: ld returned 1 exit status
> *** Error code 1
>
> Stop in /home/joshua/src/dmenu (line 28 of Makefile)
>
>
Hello,

This is an old topic, I guess you solved it,
but as I didn't see the answer on the list and met
the same situation also on OpenBSD with latest dmenu tip :

$ make
dmenu build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -D_BSD_SOURCE -DVERSION="4.2.1"
LDFLAGS = -s -L/usr/X11R6/lib -lX11
CC = cc
CC -o dmenu
/usr/X11R6/lib/libX11.so.13.0: warning: strcpy() is almost always misused, please use strlcpy()
/usr/X11R6/lib/libX11.so.13.0: warning: sprintf() is often misused, please use snprintf()
/usr/X11R6/lib/libX11.so.13.0: warning: strcat() is almost always misused, please use strlcat()
/usr/lib/crt0.o(.text+0x93): In function `___start':
: undefined reference to `main'
collect2: ld returned 1 exit status
*** Error code 1

Revision 320 is in cause, reverting it fixes the issue.
patch attached

Received on Tue Nov 30 2010 - 23:19:33 CET

This archive was generated by hypermail 2.2.0 : Wed Dec 01 2010 - 00:24:02 CET