mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Patrick Murray <Patrick.Murray@daktronics.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] Autoconf directives not invoking g++ compiler
Date: Mon, 13 May 2019 09:02:57 +0000	[thread overview]
Message-ID: <DM6PR02MB59774FDA6EC2AD973183B778FD0F0@DM6PR02MB5977.namprd02.prod.outlook.com> (raw)


[-- 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

             reply	other threads:[~2019-05-13  9:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13  9:02 Patrick Murray [this message]
2019-05-13  9:17 ` Juergen Borleis
2019-05-13  9:38   ` Juergen Borleis
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 10:25 Patrick Murray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR02MB59774FDA6EC2AD973183B778FD0F0@DM6PR02MB5977.namprd02.prod.outlook.com \
    --to=patrick.murray@daktronics.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox