pandora_with_ruby.m4 uses LDFLAGS where LIBS should be used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman Interface |
New
|
Undecided
|
Unassigned | ||
Pandora Build |
New
|
Undecided
|
Unassigned |
Bug Description
LIBS informs the build system of linking requirements whereas LDFLAGS just adds flags during linking.
This breaks using PANDORA_WITH_RUBY on Ubuntu Natty because of the implicit --as-needed that has been enabled in the linker.
This is the config.log section on natty:
configure:19847: checking for ruby
configure:19863: found /usr/bin/ruby
configure:19874: result: ruby
configure:19891: checking for ruby devel
configure:19922: gcc -std=gnu99 -o conftest -I/usr/
In file included from /usr/lib/
/usr/lib/
conftest.c:2:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:3:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:4:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:5:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:6:0: note: this is the location of the previous definition
/tmp/ccSvvtOl.o: In function `main':
conftest.
collect2: ld returned 1 exit status
configure:19922: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gearman-interface"
| #define PACKAGE_TARNAME "gearman-interface"
| #define PACKAGE_VERSION "0.13.2"
| #define PACKAGE_STRING "gearman-interface 0.13.2"
| #define PACKAGE_BUGREPORT "https:/
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_
| #define _TANDEM_SOURCE 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_STDLIB_H 1
| #define HAVE_MALLOC 1
| #define HAVE_STDLIB_H 1
| #define HAVE_REALLOC 1
| #define PACKAGE "gearman-interface"
| #define VERSION "0.13.2"
| #define HOST_VENDOR "pc"
| #define HOST_OS "linux-gnu"
| #define HOST_CPU "x86_64"
| #define TARGET_VENDOR "pc"
| #define TARGET_OS "linux-gnu"
| #define TARGET_CPU "x86_64"
| #define TARGET_OS_LINUX 1
| #define STDCXX_98_HEADERS /**/
| #define HAVE_MEMORY 1
| #define HAVE_TR1_MEMORY 1
| #define SHARED_
| #define restrict __restrict
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_VISIBILITY 1
| #define HAVE_ASSERT_H 1
| #define HAVE_LIBGEARMAN 1
| #define SWIG_TYPE_TABLE gearman-interface
| /* end confdefs.h. */
| #include <ruby.h>
| int
| main ()
| {
| VALUE rb_ac_test = rb_define_
| ;
| return 0;
| }
configure:19926: result: missing
After changing references in the file to LDFLAGS to LIBS, this is the resulting config.log:
configure:19889: checking for ruby
configure:19905: found /usr/bin/ruby
configure:19916: result: ruby
configure:19933: checking for ruby devel
configure:19964: gcc -std=gnu99 -o conftest -I/usr/
In file included from /usr/lib/
/usr/lib/
conftest.c:2:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:3:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:4:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:5:0: note: this is the location of the previous definition
/usr/lib/
conftest.c:6:0: note: this is the location of the previous definition
configure:19964: $? = 0
configure:19965: result: found
Note that the order of -lruby1.8 and conftest.c were changed, resulting in successful linking.
I will submit a merge proposal with the patch...
Related branches
- Monty Taylor: Pending requested
-
Diff: 23 lines (+3/-3)1 file modifiedm4/pandora_with_ruby.m4 (+3/-3)