Skip to contentSkip to conversation

glog: add dependency on dynamic library

PATCH New Rahul Bedarkar 2 participants 4 messages Jun 25, 2015 – Jun 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 glog: add dependency on dynamic library

when BR2_STATIC_LIBS=y

src/symbolize.cc:110:19: error: dlfcn.h: No such file or directory

glog requires dlfcn.h header. So add dependency on dynamic library

fixes:
http://autobuild.buildroot.net/results/75d/75d17ceb764c2c1136047c089a0c554770ca98a4/

---
 package/glog/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/glog/Config.in +4 -2
index aed0a3e..534997a 100644
@@ -2,10 +2,12 @@ config BR2_PACKAGE_GLOG
 	bool "glog"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
 	help
 	  C++ implementation of the Google logging module
 
 	  https://github.com/google/glog
 
-comment "glog needs a toolchain w/ C++, threads"
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+comment "glog needs a toolchain w/ C++, threads, dynamic library"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 glog: disable on blackfin external toolchains

With following blackfin toolchains

BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1
BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1
BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2

when BR2_BINFMT_FDPIC=y

../usr/include/bits/elf-fdpic.h: In function 'void* __reloc_pointer(void*, const elf32_fdpic_loadmap*)':
../usr/include/bits/elf-fdpic.h:95: error: invalid use of 'void'

code snippet at line 95 in elf-fdpic.h
-------------------------------------------------------
unsigned long offset = p - (void*)map->segs[c].p_vaddr;
-------------------------------------------------------

void pointer addition and subtraction is not allowed in C++ as it has undetermined size, however in C with language extension it is possible because sizeof void is treated as one byte.

This is toolchain-specific issue. So disable package on these external toolchains.

fixes:
http://autobuild.buildroot.net/results/c70/c704c70ae2f066f85dd6a5fa6a73789bc358d368/

---
 package/glog/Config.in | 7 +++++++
 1 file changed, 7 insertions(+)
package/glog/Config.in +7 -0
index 534997a..3f54020 100644
@@ -3,11 +3,18 @@ config BR2_PACKAGE_GLOG
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
+	# build issues with these external toolchains
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2
 	help
 	  C++ implementation of the Google logging module
 
 	  https://github.com/google/glog
 
 comment "glog needs a toolchain w/ C++, threads, dynamic library"
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
 		BR2_STATIC_LIBS
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 glog: disable on blackfin external toolchains

Dear Rahul Bedarkar,

Quoted 8 lines · Rahul Bedarkar

With following blackfin toolchains

BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1
BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1
BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2

when BR2_BINFMT_FDPIC=y

Quoted 7 lines

../usr/include/bits/elf-fdpic.h: In function 'void* __reloc_pointer(void*, const elf32_fdpic_loadmap*)':
../usr/include/bits/elf-fdpic.h:95: error: invalid use of 'void'

code snippet at line 95 in elf-fdpic.h
-------------------------------------------------------
unsigned long offset = p - (void*)map->segs[c].p_vaddr;
-------------------------------------------------------

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 glog: add dependency on dynamic library

In reply to Rahul Bedarkar

Dear Rahul Bedarkar,

Quoted 6 lines · Rahul Bedarkar

when BR2_STATIC_LIBS=y

src/symbolize.cc:110:19: error: dlfcn.h: No such file or directory

glog requires dlfcn.h header. So add dependency on dynamic library

Quoted 7 lines

fixes:
http://autobuild.buildroot.net/results/75d/75d17ceb764c2c1136047c089a0c554770ca98a4/

---
 package/glog/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com