Modify

Opened 12 years ago

Closed 12 years ago

Last modified 4 years ago

#117 closed defect (fixed)

olsrd-mod-httpinfo doesn't build

Reported by: tristan@… Owned by: nico
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: 2.0
Keywords: Cc: tristan@…

Description

I can't seem to get olsrd-mod-httpinfo to build:

make[6]: Entering directory `/data2/openwrt/tristan/aruba/build_mips/olsrd-0.4.9/lib/httpinfo'
/data2/openwrt/tristan/aruba/staging_dir_mips/bin/mips-linux-uclibc-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmiss
ing-declarations -Wsign-compare -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time   -DNODEBUG -Isrc -Dlinux -fPIC -DOLSR_PLUGI
N -I../../src   -c -o src/olsrd_plugin.o src/olsrd_plugin.c
/data2/openwrt/tristan/aruba/staging_dir_mips/bin/mips-linux-uclibc-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmiss
ing-declarations -Wsign-compare -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time   -DNODEBUG -Isrc -Dlinux -fPIC -DOLSR_PLUGI
N -I../../src   -c -o src/olsrd_httpinfo.o src/olsrd_httpinfo.c
/data2/openwrt/tristan/aruba/staging_dir_mips/bin/mips-linux-uclibc-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmiss
ing-declarations -Wsign-compare -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time   -DNODEBUG -Isrc -Dlinux -fPIC -DOLSR_PLUGI
N -I../../src   -c -o src/admin_interface.o src/admin_interface.c
/data2/openwrt/tristan/aruba/staging_dir_mips/bin/mips-linux-uclibc-gcc -L/usr/lib:/lib -Wl,-soname,olsrd_httpinfo.so.0.1 \
-Wl,--version-script=version-script.txt \
-o olsrd_httpinfo.so.0.1 src/olsrd_plugin.o src/olsrd_httpinfo.o src/admin_interface.o ../../src/cfgparser/cfgfile_gen.o  -lc
 -lm
/data2/openwrt/tristan/aruba/staging_dir_mips/bin/../lib/gcc/mips-linux-uclibc/3.4.4/../../../../mips-linux-uclibc/lib/crt1.o
: In function `__start':
crt1.S:(.text+0x1c): undefined reference to `main'
collect2: ld returned 1 exit status
make[6]: *** [plugin] Error 1
make[6]: Leaving directory `/data2/openwrt/tristan/aruba/build_mips/olsrd-0.4.9/lib/httpinfo'

This bug has been fixed in olsrd (see http://cvs.sourceforge.net/viewcvs.py/olsrd/olsrd-current/lib/httpinfo/Makefile?rev=1.19&view=markup) so I just pulled a newer Makefile from CVS and created the following package/olsrd/patches/olsrd-0.4.9-httpinfo-makefile.patch

diff -urN olsrd-0.4.9.orig/lib/httpinfo/Makefile olsrd-0.4.9/lib/httpinfo/Makefile
--- olsrd-0.4.9.orig/lib/httpinfo/Makefile      2005-03-31 12:11:52.000000000 -0500
+++ olsrd-0.4.9/lib/httpinfo/Makefile   2005-12-06 21:49:11.000000000 -0500
@@ -1,103 +1,216 @@
-#######################################
-# HTTPINFO PLUGIN BY ANDREAS T<D8>NNESEN #
-#######################################
+# The olsr.org Optimized Link-State Routing daemon(olsrd)
+# Copyright (c) 2004, Andreas T<F8>nnesen(andreto@olsr.org)
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
+# modification, are permitted provided that the following conditions 
+# are met:
+#
+# * Redistributions of source code must retain the above copyright 
+#   notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright 
+#   notice, this list of conditions and the following disclaimer in 
+#   the documentation and/or other materials provided with the 
+#   distribution.
+# * Neither the name of olsr.org, olsrd nor the names of its 
+#   contributors may be used to endorse or promote products derived 
+#   from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# Visit http://www.olsr.org for more information.
+#
+# If you find this software useful feel free to make a donation
+# to the project. For more information see the website or contact
+# the copyright holders.
+#
+# $Id: Makefile,v 1.19 2005/04/25 10:57:17 br1 Exp $
+
+PLUGIN_NAME =  olsrd_httpinfo
+PLUGIN_VER =   0.1
+
+CC ?=          gcc
+STRIP ?=       strip
+
+# default CFLAGS and LDFLAGS, used if not externally set
+
+# used for compilation: yes
+# used for dependency file generation: no
+
+CFLAGS_SET =   -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes
+LDFLAGS_SET =  -g
+
+# always appended to default or externally set CFLAGS and LDFLAGS
+
+# used for compilation: yes
+# used for dependency file generation: yes
+
+CFLAGS_ADD =   -DOLSR_PLUGIN -I../../src
+LDFLAGS_ADD =  -Wall -shared -Wl,--version-script=version-script.txt
+
+# same as CFLAGS_ADD, but not used for dependency file generation
+
+# used for compilation: yes
+# used for dependency file generation: no
+
+CFLAGS_ADD2 =  # nothing
+
+DEPFILE =      .depend
+
+SRCS =         $(wildcard src/*.c)
+OBJS =         $(patsubst %.c,%.o,$(SRCS))
+HDRS =         $(wildcard src/*.c)
+
+ifndef OS
+all:           help
+install:       help
+clean:         help
+endif
 
+ifeq ($(OS), linux)
 
-CC ?= gcc
-STRIP ?= strip
-LIBDIR ?= $(INSTALL_PREFIX)/usr/lib
-PLUGINFLAGS =  -fPIC -DOLSR_PLUGIN -I../../src
+NAME ?=                $(PLUGIN_NAME).so.$(PLUGIN_VER)
 
-ifeq ($(OS), linux)
-NAME ?= olsrd_httpinfo.so.0.1
-NAMEFLAGS ?= -Wl,-soname,$(NAME)
-CFLAGS ?= -g -O2 -fPIC -DOLSR_PLUGIN -Dlinux -Wall -Wmissing-prototypes -Wstrict-prototypes
-LDFLAGS ?= -g -fPIC -shared
-LIBS ?= -lc -lm
-INSTALL_LIB =  install -D -m 755 $(NAME) $(LIBDIR)/$(NAME);\
+CFLAGS_ADD +=  -Dlinux
+CFLAGS_ADD2 += -fPIC
+LDFLAGS_ADD += -fPIC -Wl,-soname,$(NAME)
+
+CFLAGS_SET +=  # nothing
+LDFLAGS_SET += # nothing
+
+LIBS ?=                -lc -lm
+
+LIBDIR ?=      $(INSTALL_PREFIX)/usr/lib
+
+INSTALL_LIB =  install -D -m 755 $(NAME) $(LIBDIR)/$(NAME); \
                /sbin/ldconfig -n $(LIBDIR)
-all:           plugin
-install:        install_olsrd
-else
-ifeq ($(OS), win32)
-NAME ?= olsrd_httpinfo.dll
-NAMEFLAGS ?= -o $(NAME)
-CFLAGS ?= -g -O2 -fPIC -DWIN32 -mno-cygwin -I../../src/win32 -Wall -Wmissing-prototypes -Wstrict-prototypes
-LDFLAGS ?= -mno-cygwin -shared
-LIBS ?= -lws2_32
-COMPATOBJ = ../../src/win32/compat.o
-INSTALL_LIB =  cp $(NAME) ../..
-all:           plugin
-install:        install_olsrd
+
+EXTRA_OBJS =   # nothing
+
+MAKEDEPEND =   makedepend -f $(DEPFILE) $(CFLAGS_ADD) -Y $(INCLUDES) \
+               $(SRCS) >/dev/null 2>&1
+
+all:           all2
+install:       install2
+clean:         clean2
+
 else
 ifeq ($(OS), fbsd)
-NAME ?= olsrd_httpinfo.so.0.1
-NAMEFLAGS ?= -Wl,-soname,$(NAME)
-CFLAGS ?= -g -O2 -fPIC -Wall -Wmissing-prototypes -Wstrict-prototypes
-LDFLAGS ?= -g -fPIC -shared
-LIBS ?= -lc -lm
-INSTALL_LIB =  install -m 755 $(NAME) $(LIBDIR)/$(NAME);\
+
+NAME ?=                $(PLUGIN_NAME).so.$(PLUGIN_VER)
+
+CFLAGS_ADD +=  # nothing
+CFLAGS_ADD2 += -fPIC
+LDFLAGS_ADD += -fPIC -Wl,-soname,$(NAME)
+
+CFLAGS_SET +=  # nothing
+LDFLAGS_SET += # nothing
+
+LIBS ?=                -lc -lm
+
+LIBDIR ?=      $(INSTALL_PREFIX)/usr/lib
+
+INSTALL_LIB =  install -m 755 $(NAME) $(LIBDIR)/$(NAME); \
                /sbin/ldconfig
-all:           plugin
-install:        install_olsrd
+
+EXTRA_OBJS =   # nothing
+
+MAKEDEPEND =   makedepend -f $(DEPFILE) $(CFLAGS_ADD) $(INCLUDES) $(SRCS)
+
+all:           all2
+install:       install2
+clean:         clean2
+
 else
-all:   help
-install:help
-endif
-endif
-endif
+ifeq ($(OS), win32)
 
-ifneq ($(ADMIN_INTERFACE), )
-       @echo 'WARNING - BUILDING WITH ADMIN INTERFACE!'
-CFLAGS += -DADMIN_INTERFACE
-endif
+NAME ?=                $(PLUGIN_NAME).dll
 
-CFLAGS += $(PLUGINFLAGS)
+CFLAGS_ADD +=  -mno-cygwin -I../../src/win32 -DWIN32
+CFLAGS_ADD2 += # nothing
+LDFLAGS_ADD += -mno-cygwin -Wl,-soname,$(NAME)
 
-#Sourcefiles
-SRCS=  src/olsrd_plugin.c src/olsrd_httpinfo.c src/admin_interface.c \
-       ../../src/cfgparser/cfgfile_gen.c
+CFLAGS_SET +=  # nothing
+LDFLAGS_SET += # nothing
 
-#Objectfiles
-OBJS=  src/olsrd_plugin.o src/olsrd_httpinfo.o src/admin_interface.o \
-       ../../src/cfgparser/cfgfile_gen.o
+LIBS ?=                -lws2_32
 
-#Headerfiles
-HDRS=  src/olsrd_plugin.h src/olsrd_httpinfo.h \
-       src/gfx.h src/html.h src/admin_interface.h src/admin_html.h
+INSTALL_LIB =  cp $(NAME) ../..
 
+EXTRA_OBJS =   ../../src/win32/compat.o
 
-plugin: $(OBJS)
-       $(CC) $(LDFLAGS) $(NAMEFLAGS) \
-       -Wl,--version-script=version-script.txt \
-       -o $(NAME) $(OBJS) $(COMPATOBJ) $(LIBS)
+MAKEDEPEND =   makedepend -f $(DEPFILE) $(CFLAGS_ADD) $(INCLUDES) $(SRCS)
 
+all:           all2
+install:       install2
+clean:         clean2
 
-install_olsrd:
-       $(STRIP) $(NAME)
-       $(INSTALL_LIB)
+else
 
-help:
-       @echo
-       @echo '***** olsr.org HTTP plugin Make ****'
-       @echo ' You must provide a valid target OS '
-       @echo ' by setting the OS variable! Valid  '
-       @echo ' target OSes are:                   '
-       @echo ' ---------------------------------  '
-       @echo ' linux - GNU/Linux                  '
-       @echo ' win32 - MS Windows                 '
-       @echo ' fbsd  - FreeBSD                    '
-       @echo ' ---------------------------------  '
-       @echo ' Example - build for windows:       '
-       @echo ' make OS=win32                      '
-       @echo '************************************'
-       @echo
+all:           help
+install:       help
+clean:         help
+
+endif
+endif
+endif
+
+CFLAGS ?=      $(CFLAGS_SET)
+LDFLAGS ?=     $(LDFLAGS_SET)
+
+CFLAGS         += $(CFLAGS_ADD) $(CFLAGS_ADD2)
+LDFLAGS                += $(LDFLAGS_ADD)
 
-clean:
-       rm -f $(OBJS) $(NAME)
+all2:          $(NAME)
 
-src/olsrd_plugin.o: $(HDRS)
+$(NAME):       $(OBJS) $(EXTRA_OBJS)
+               $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(EXTRA_OBJS) $(LIBS)
 
-src/olsrd_httpinfo.o: $(HDRS)
+install2:      $(NAME)
+               $(STRIP) $(NAME)
+               $(INSTALL_LIB)
+
+clean2:
+               rm -f $(OBJS) $(NAME) $(DEPFILE)
+
+$(DEPFILE):    $(SRCS) $(HDRS)
+ifdef MAKEDEPEND
+               echo "# Generated automatically. DO NOT EDIT." >$(DEPFILE)
+               $(MAKEDEPEND)
+endif
+
+help:
+               @echo
+               @echo '                     * * * *  olsr.org Plugin Make  * * * *'
+               @echo
+               @echo '  Plugin: $(PLUGIN_NAME), version $(PLUGIN_VER)'
+               @echo
+               @echo '  You must provide a valid target OS by setting the OS variable.'
+               @echo
+               @echo '  Valid settings are:'
+               @echo
+               @echo '    linux - GNU/Linux'
+               @echo '    win32 - Microsoft Windows'
+               @echo '    fbsd  - FreeBSD'
+               @echo
+               @echo '  Example - Build on Windows:'
+               @echo
+               @echo '    make OS=win32'
+               @echo
+               @echo '  Example - Build and install on Linux:'
+               @echo
+               @echo '    make OS=linux install            '
+               @echo
 
-src/admin_interface.o: $(HDRS)
+sinclude $(DEPFILE)

This allowed olsrd to build.

Attachments (0)

Change History (5)

comment:1 Changed 12 years ago by nico

  • Owner changed from developers to nico
  • Status changed from new to assigned

The build error you posted shows a -L/usr/lib:/lib that is passed to the linker. I have no idea where it came from.

Can you provide more informations on what you're trying to build (whiterussian or kamikaze), your build environment and the modifications you made to the buildroot ?

Thanks for your help

comment:2 Changed 12 years ago by nico

  • Cc tristan@… added

Can you provide more informations, please?

comment:3 Changed 12 years ago by kaloz

  • Milestone set to 2.0
  • Version set to 2.0

comment:4 Changed 12 years ago by nico

  • Resolution set to fixed
  • Status changed from assigned to closed

The olsrd package was updated in both whiterussian [2837] and trunk [2839], so I guess this report is no longer relevant.

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.