mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* Re: [ptxdist] Autoconf directives not invoking g++ compiler
@ 2019-05-13 10:25 Patrick Murray
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Murray @ 2019-05-13 10:25 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2819 bytes --]

Hi,

Yes I did already change AC_CONFIG_SRCDIR in configure.ac , I have tried renaming the libpsc.c to libpsc.cxx and libpsc.cc ,
Still make no difference .

It seems the "default" is it expects a file called libpsc.c .

----------------------
target: libpsc.prepare
----------------------

configure: error: cannot find sources (libpsc.c) in ../libpsc or ..
make: *** [/opt/lib/ptxdist-2019.03.1/rules/post/ptxd_make_world_prepare.make:22: /opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/platform-phyFLEX-i.MX6/state/libpsc.prepare] Error 1

I still believe it hasn't found the C++ compiler .

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ grep CONFIG_SRCDIR *.*
grep: autom4te.cache: Is a directory
configure.ac:#AC_CONFIG_SRCDIR([R3PSC.cpp])
configure.ac:#AC_CONFIG_SRCDIR([libpsc.cxx])
configure.ac:AC_CONFIG_SRCDIR([libpsc.cc])

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ ls libpsc.*
libpsc.cc  libpsc.c_orig  libpsc.h


dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ ls *.cpp
accessors.cpp                   device_instance_master.cpp     device_instance_vcb2.cpp    device_type_mlc5.cpp       exception.cpp
debug.cpp                       device_instance_mlc5.cpp       device_instance_vfc2.cpp    device_type_mod.cpp        R3PSC.cpp
device_connections.cpp          device_instance_mod.cpp        device_sets.cpp             device_type_plc5.cpp       simpleXPath.cpp
device_instance_base.cpp        device_instance_plc5.cpp       device_type_base.cpp        device_type_plr.cpp        utils.cpp
device_instance_canmod.cpp      device_instance_plr.cpp        device_type_canmod.cpp      device_type_ppc5pixel.cpp  xml_processor.cpp
device_instance_collection.cpp  device_instance_ppc5pixel.cpp  device_type_collection.cpp  device_type_sc7mod.cpp
device_instance_lcd.cpp         device_instance_sc7mod.cpp     device_type_lcd.cpp         device_type_vcb2.cpp
device_instance_master5.cpp     device_instance_unknown.cpp    device_type_master.cpp      device_type_vfc2.cpp


This email and any attachments may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication or any of its contents is strictly prohibited. If you are not the named recipient, or have otherwise received this communication in error, please delete it from your inbox, notify the sender immediately, and do not disclose the contents to any other person or use them for any purpose, or store them in any medium. Thank you for your cooperation.

[-- Attachment #1.2: Type: text/html, Size: 6808 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [ptxdist] Autoconf directives not invoking g++ compiler
@ 2019-05-13  9:45 Patrick Murray
  2019-05-13  9:58 ` Juergen Borleis
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Murray @ 2019-05-13  9:45 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1960 bytes --]

Hi,

I tried renamed libpsc.c to libpsc.cpp ( and .ccx) , no difference in the outcome,  running ./configure fails and so does the ptxdist libpsc compile.

Question , in a autotools library package are you only allowed either c file or c++ file ?

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ ./configure
configure: error: cannot find sources (libpsc.c) in . or ..

ptxdist compile libpsc

----------------------
target: libpsc.compile
----------------------

make[1]: Entering directory '/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/platform-phyFLEX-i.MX6/build-target/libpsc-build'
make --no-print-directory all-am
make[2]: *** No rule to make target 'libpsc.c', needed by 'liblibpsc_la-libpsc.lo'.  Stop.
make[1]: *** [Makefile:476: all] Error 2
make[1]: Leaving directory '/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/platform-phyFLEX-i.MX6/build-target/libpsc-build'
make: *** [/opt/lib/ptxdist-2019.03.1/rules/post/ptxd_make_world_compile.make:22: /opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/platform-phyFLEX-i.MX6/state/libpsc.compile] Error 2
dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4$<mailto:dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4$>


This email and any attachments may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication or any of its contents is strictly prohibited. If you are not the named recipient, or have otherwise received this communication in error, please delete it from your inbox, notify the sender immediately, and do not disclose the contents to any other person or use them for any purpose, or store them in any medium. Thank you for your cooperation.

[-- Attachment #1.2: Type: text/html, Size: 4543 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [ptxdist] Autoconf directives not invoking g++ compiler
@ 2019-05-13  9:02 Patrick Murray
  2019-05-13  9:17 ` Juergen Borleis
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Murray @ 2019-05-13  9:02 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 3095 bytes --]

Hi,

I have created a library package (libpsc) using "src-autoconf-lib" , it builds the template fine , but if use .cpp file it fails.
I have tried several changes to configure.ac and ( ran ./configure each time). It fails at the C++ directive
#include <string>

I have include the configure.ac and some relevant searches below
Any suggestions much appreciated.

Thanks Pat

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ grep -n AC_LANG configure.ac
41:AC_LANG=C++
dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ grep -n AC_PROG_ configure.ac
44:#AC_PROG_CC
45:#AC_PROG_CXX
46:AC_PROG_CXXCPP
47:#AC_PROG_CXX[g++]
48:AC_PROG_CXX

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4$ grep -A 3 -B 3 string local_src/libpsc/libpsc_internal.h
#pragma once
#include <string>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "libpsc.h"

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4$ ptxdist toolchain
found and using toolchain:
'/opt/OSELAS.Toolchain-2016.06.0/arm-v5te-linux-gnueabi/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized/bin'

dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_src/libpsc$ ls /opt/OSELAS.Toolchain-2016.06.0/arm-v5te-linux-gnueabi/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized/bin
arm-v5te-linux-gnueabi-addr2line  arm-v5te-linux-gnueabi-g++         arm-v5te-linux-gnueabi-gdb      arm-v5te-linux-gnueabi-ranlib
arm-v5te-linux-gnueabi-ar         arm-v5te-linux-gnueabi-gcc         arm-v5te-linux-gnueabi-gprof    arm-v5te-linux-gnueabi-readelf
arm-v5te-linux-gnueabi-as         arm-v5te-linux-gnueabi-gcc-5.4.0   arm-v5te-linux-gnueabi-ld       arm-v5te-linux-gnueabi-run
arm-v5te-linux-gnueabi-c++        arm-v5te-linux-gnueabi-gcc-ar      arm-v5te-linux-gnueabi-ld.bfd   arm-v5te-linux-gnueabi-size
arm-v5te-linux-gnueabi-c++filt    arm-v5te-linux-gnueabi-gcc-nm      arm-v5te-linux-gnueabi-ld.gold  arm-v5te-linux-gnueabi-strings
arm-v5te-linux-gnueabi-cpp        arm-v5te-linux-gnueabi-gcc-ranlib  arm-v5te-linux-gnueabi-nm       arm-v5te-linux-gnueabi-strip
arm-v5te-linux-gnueabi-dwp        arm-v5te-linux-gnueabi-gcov        arm-v5te-linux-gnueabi-objcopy  ptxconfig
arm-v5te-linux-gnueabi-elfedit    arm-v5te-linux-gnueabi-gcov-tool   arm-v5te-linux-gnueabi-objdump




This email and any attachments may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication or any of its contents is strictly prohibited. If you are not the named recipient, or have otherwise received this communication in error, please delete it from your inbox, notify the sender immediately, and do not disclose the contents to any other person or use them for any purpose, or store them in any medium. Thank you for your cooperation.

[-- Attachment #1.2: Type: text/html, Size: 7056 bytes --]

[-- Attachment #2: configure.ac --]
[-- Type: application/octet-stream, Size: 6894 bytes --]

AC_PREREQ(2.69)

# TODO add useful information about this package
AC_INIT([libpsc], 0.0.0, [bugs@yourdomain.to], [libpsc], [http://www.yourdomain.to/])
AC_CONFIG_SRCDIR([R3PSC.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST

# default is less output while building the package
AM_SILENT_RULES([yes])

# TODO If you don't want the default installation path to be '/usr/local' change it here
# AC_PREFIX_DEFAULT(<new prefix>)

# TODO If possible, enable extensions to Posix
AC_USE_SYSTEM_EXTENSIONS

#
# libtool library versioning stuff
#
# Library code modified:            REVISION++
# Interfaces changed/added/removed: CURRENT++   REVISION=0
# Interfaces added:                 AGE++
# Interfaces removed:               AGE=0
LT_CURRENT=0
LT_REVISION=0
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([foreign no-exeext dist-xz silent-rules subdir-objects])

#
# Checks for programs.
#

AC_LANG=C++
#CXXFLAGS="$CXXFLAGS -std=c++0x"
CXXFLAGS
#AC_PROG_CC
#AC_PROG_CXX
AC_PROG_CXXCPP
#AC_PROG_CXX[g++]
AC_PROG_CXX

#
# TODO to only build the static library uncomment the following line
# AC_DISABLE_SHARED([])
# TODO to only build the shared library uncomment the following line
# AC_DISABLE_STATIC([])

LT_INIT

#
# Using additional preprocessor, compiler or linker flags:
# - add them to AM_CPPFLAGS, AM_CFLAGS or AM_LDFLAGS if they should be used
#   by all source files
# - give the user a chance to setup her/his own flags with the CPPFLAGS, CFLAGS
#   and LDFLAGS
# - if some flags are specific to a file add the flags via the substitute macro
#   into the Makefile
#
# Don't add the "-g" to the CFLAGS variable. It will be done automatically if
# autoconf detects a GNU compiler.
#

#
# Please note: 'configure' defaults the CFLAGS to "-O2 -g" if it detects a
# GCC. If the user overwrites the CFLAGS externallly, there will be no default!
# Keep the user informed about this behaviour.

#
# TODO Check here for mandadory external libraries
#
# Rule of thumb: when your library needs an external library, add it
# to the 'LIBS' variable. Do _not_ add it manually into the Makefile.am files.
# These libraries _must_ be listed in the *.pc file.
#
# Don't add libraries without a check. Even if you know the 'sqrt()' requires
# 'libm' on most systems, check for its real need with 'AC_SEARCH_LIBS(sqrt, m)'.
# Doing it in this way will ensure an embedded developer knows exactly what
# dependencies your library has (because it gets listed in the *.pc file).
#
# Another way for checking libraries is the PKG_CHECK_MODULES macro. But please
# honor if a user switches off a feature you also switch of the test for a
# external component via PKG_CHECK_MODULES when it is no longer required!
# PKG_CHECK_MODULES returns *_CFLAGS and *_LIBS. Again, add the *_LIBS to the
# global 'LIBS', but for the CFLAGS you can decide if you add them to the
# CFLAGS, AM_CFLAGS or as substitution variables in the Makefile.am.

#REQUIRES_LIBSOMETHING="libsomething >= 20090402-1"
#AC_SUBST(REQUIRES_LIBSOMETHING)
#PKG_CHECK_MODULES(libsomething, $REQUIRES_LIBSOMETHING)

#
# TODO Check for functions and header files. First write your code and then run
# the 'autoscan' tool to get an idea what is still missing in your 'configure.ac'
#

# where to install pgk info files
PKG_INSTALLDIR

PTX_COMMON_CHECKS
PTX_LIBRARY_CHECKS

# ---------------------------------------------------------------------------

# TODO Checking if this CPU has a hardware floating point unit

#AX_HARDWARE_FP([target_hardware_fp=yes], [target_hardware_fp=no])

# When a hardware floating point unit seems available, then use it.
# This will end in bad code on badly configured compilers which generates
# floating point instructions even if the CPU has not hardware FP unit
#
#AS_IF([test x${target_hardware_fp} = "xyes"],
#	[AC_MSG_NOTICE([FPU available])],
#	[AC_MSG_NOTICE([FPU not available])])

# ---------------------------------------------------------------------------

# TODO discover on demand the special architecture this compiler builds code
# for. This can be useful if the package provides some optimized code for
# specific architectures.

#AS_IF([test x${host_cpu} = "xarm"],
#	[AX_DETECT_ARMV4([enable_arm4=yes], [enable_arm4=no])
#	AX_DETECT_ARMV5([enable_arm5=yes], [enable_arm5=no])
#	AX_DETECT_ARMV6([enable_arm6=yes], [enable_arm6=no])
#	AX_DETECT_ARMV7([enable_arm7=yes], [enable_arm7=no])
#
#	AS_IF([test x${enable_arm4} = "xyes"], [AC_MSG_NOTICE([ARMv4 target])])
#	AS_IF([test x${enable_arm5} = "xyes"], [AC_MSG_NOTICE([ARMv5 target])])
#	AS_IF([test x${enable_arm6} = "xyes"], [AC_MSG_NOTICE([ARMv6 target])])
#	AS_IF([test x${enable_arm7} = "xyes"], [AC_MSG_NOTICE([ARMv7 target])])])

# -------------------------- use all the settings ----------------------------

# substitute the settings valid for all source files
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_LDFLAGS)

# add private libs to the pkg-config file
# 'private libs' are those required to link this library
# its used later on if someone wants to link this library statically
AC_SUBST(LIBS)

# add required lib information to the pkg-config file (on demand)
AC_SUBST(REQUIRES)

# add lib information which may conflicts with this libarry
AC_SUBST(CONFLICTS)

# add special compile flags on demand
AC_SUBST(PRIVATE_CFLAGS)

# be very silent on request
AM_CONDITIONAL(BUILD_SILENTLY, test "x$AM_DEFAULT_VERBOSITY" = x0)

AC_CONFIG_FILES([
	Makefile
	liblibpsc.pc
])
AC_OUTPUT

AC_MSG_RESULT([
	------------------------------------------------------
	Configure results for: ${PACKAGE}
	------------------------------------------------------

	Release State:
	------------------------------------------------------
	 Library release:	${LT_CURRENT}.${LT_REVISION}.${LT_AGE}
	 Package release:	${VERSION}

	General:
	------------------------------------------------------
	 Cross compiling:	${cross_compiling}
	 Compiler:		${CC}
	 Target CPU:		${host_cpu}
	 Target OS:		${host_os}

	Detected options:
	------------------------------------------------------
	 CPPFLAGS:		${CPPFLAGS}
	 CFLAGS:		${CFLAGS}
	 LDFLAGS:		${LDFLAGS}
	 Debug:			${enable_debug}
	 Hidden symbols		${enable_hide}
	 Coverage:		${enable_coverage}
		CPPFLAGS:	${CODE_COVERAGE_CPPFLAGS}
		CFLAGS:		${CODE_COVERAGE_CFLAGS}
		LDFLAGS:	${CODE_COVERAGE_LDFLAGS}
	 Profiling:		${enable_profile}
	 Optimisation goal:	${with_goal}
	 Private libs:		${LIBS}
	 Use abort():		${enable_abort}

	User options:
	------------------------------------------------------
	 CFLAGS:		${CFLAGS}
	 CPPFLAGS:		${CPPFLAGS}
	 LDFLAGS:		${LDFLAGS}

	Install options:
	------------------------------------------------------
	 prefix:		${prefix}
	 sysconfdir:		${sysconfdir}
	 libdir:		${libdir}
	 includedir:		${includedir}
	 bindir:		${bindir}
	 pkgconfigdir:		${pkgconfigdir}
])

[-- Attachment #3: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-15  8:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 10:25 [ptxdist] Autoconf directives not invoking g++ compiler Patrick Murray
  -- strict thread matches above, loose matches on Subject: below --
2019-05-13  9:45 Patrick Murray
2019-05-13  9:58 ` Juergen Borleis
2019-05-13 16:19   ` Patrick Murray
2019-05-15  8:29     ` Juergen Borleis
2019-05-13  9:02 Patrick Murray
2019-05-13  9:17 ` Juergen Borleis
2019-05-13  9:38   ` Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox