Discussion:
[OpenIndiana-discuss] Need some building expertise, Thank You.
Jason Martin
2018-05-22 17:32:46 UTC
Permalink
Please look over my attempt. Four WHY,s below.

First off it's up and running if you understand autotools, make and etc.

Some of its tools are in /usr/share and will not execute. Move?

include ../../../../make-rules/shared-macros.mk

COMPONENT_NAME= anjuta
COMPONENT_VERSION= 3.26.0
COMPONENT_SUMMARY= GNOME development IDE, for C/C++
COMPONENT_PROJECT_URL= http://anjuta.org/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
COMPONENT_ARCHIVE_HASH= \
sha256:fb895464c1a3c915bb2bb3ea5d236fd17202caa7205f6792f70a75affc343d70
COMPONENT_ARCHIVE_URL=
https://ftp.gnome.org/pub/GNOME/sources/anjuta/3.26/$(COMPONENT_ARCHIVE)
COMPONENT_CLASSIFICATION= Development/GNOME and GTK+
COMPONENT_FMRI= developer/anjuta
COMPONENT_LICENSE = GPLv2
COMPONENT_LICENSE_FILE= $(COMPONENT_NAME).license

include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk

PATH=$(PATH.gnu)

# Two patches; One is a ubuntu no gettext patch for configure.ac
# Do not know if it is even needed.
COMPONENT_PREP_ACTION = (cd $(@D) && autoreconf -f -i)

CONFIGURE_BINDIR.64 = $(CONFIGURE_BINDIR.32)

# PKG_CONFIG_PATHS
GNUTLS_PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig/gnutls-3
PKG_CONFIG_PATH =
$(GNUTLS_PKG_CONFIG_PATH_$(BITS)):$(PKG_CONFIG_PATH.$(BITS))

CFLAGS += -fPIC
CFLAGS += -Wno-error=format-nonliteral

LDFLAGS += -lm

# WHY do I need to pass this for plugins/parser-cxx?
CXXFLAGS += -D__cplusplus

# only 32 bit devhelp webkitgtk in userland for now
CONFIGURE_OPTIONS += --disable-plugin-devhelp

# only 32 bit glade in userland for now
CONFIGURE_OPTIONS += --disable-plugin-glade

# gobject-introspection
COMPONENT_BUILD_ENV += CC="$(CC)"
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"

# WHY Emulated forkpty happy with 64 but not 32?
build: $(BUILD_64)

install: $(INSTALL_64)

test: $(TEST_64)

# Build dependencies
REQUIRED_PACKAGES += text/itstool
REQUIRED_PACKAGES += developer/build/autogen

# Auto-generated dependencies
REQUIRED_PACKAGES += developer/vala
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
REQUIRED_PACKAGES += library/desktop/gtk3
REQUIRED_PACKAGES += library/desktop/gtksourceview3
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/desktop/vte-291
# NEW - not commited yet
REQUIRED_PACKAGES += library/gdl
REQUIRED_PACKAGES += library/glib2
# NEW - not commited yet embedded sqlite3 only - userland sqlite3 missing a
call
REQUIRED_PACKAGES += library/libgda
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += runtime/python-27
REQUIRED_PACKAGES += system/library
# WHY gcc-4?
REQUIRED_PACKAGES += system/library/g++-4-runtime
REQUIRED_PACKAGES += system/library/gcc-4-runtime



# WHY does subversion plugin build but links missing on publish?

# I can find and build subversion but does not link in:
# /usr/lib/svn/$(MACH64)/libsvn_subr-1
# /usr/lib/svn/$(MACH64)/libsvn_client-1

# USED TO OVERRIDE PKG_CONFIG in configure to find subversion, apr stuff

#APR_PKG_CONFIG_PATH_64 = /usr/apr/lib/$(MACH64)/pkgconfig
#APR_UTIL_PKG_CONFIG_PATH_64 = /usr/apr-util/lib/$(MACH64)/pkgconfig
#PKG_CONFIG_PATH =
$(GNUTLS_PKG_CONFIG_PATH_$(BITS)):$(PKG_CONFIG_PATH.$(BITS)):$(APR_PKG_CONFIG_PATH_$(BITS)):$(APR_UTIL_PKG_CONFIG_PATH_$(BITS))
#CFLAGS += -I/usr/apr/include
#CFLAGS += -I/usr/apr-util/include
#APR_LIBS = /usr/apr/lib/$(MACH64)/apr-1
#APR_UTILS_LIBS = /usr/apr-util/lib/$(MACH64)/aprutil-1
#CONFIGURE_ENV += APR_LIBS=$(APR_LIBS)
#CONFIGURE_ENV += APR_UTILS_LIBS=$(APR_UTILS_LIBS)
#CONFIGURE_OPTIONS += --with-svn-include=/usr/include/svn
#CONFIGURE_OPTIONS += --with-svn-lib=/usr/lib/svn/$(MACH64)
Alexander Pyhalov
2018-05-23 07:10:46 UTC
Permalink
Post by Jason Martin
Please look over my attempt. Four WHY,s below.
First off it's up and running if you understand autotools, make and etc.
# Two patches; One is a ubuntu no gettext patch for configure.ac
# Do not know if it is even needed.
So why adding it?
Post by Jason Martin
CFLAGS += -fPIC
Why do we need global -fPIC flag?
Post by Jason Martin
CFLAGS += -Wno-error=format-nonliteral
LDFLAGS += -lm
# WHY do I need to pass this for plugins/parser-cxx?
CXXFLAGS += -D__cplusplus
Don't know, simple test shows that g++ 6 defines it

#if defined(__cplusplus)
#error "Defined"
#endif
Post by Jason Martin
# WHY Emulated forkpty happy with 64 but not 32?
Emulated forkpty() can have issues in XPG6 mode, check it carefully.
Post by Jason Martin
# WHY does subversion plugin build but links missing on publish?
How does link look like? How does it complain?
--
Best regards,
Alexander Pyhalov,
system administrator of Southern Federal University IT department
Jason Martin
2018-05-23 18:52:16 UTC
Permalink
When building the subversion plugin why is PKG_CHECK_MODULES returning
32 bit?


Patched configure.ac to

echo PKG_CONFIG_PATH

YES /usr/lib/amd64/pkgconfig/gnutls-3:
YES /usr/lib/amd64/pkgconfig:
YES /usr/apr/lib/amd64/pkgconfig:
YES /usr/apr-util/lib/amd64/pkgconfig:

echo what is returned after PKG_CHECK_MODULES(APR .... call

-L/usr/apr/lib -lapr-1 -luuid -lsendfile -lsocket -lnsl -lpthread

############################# NO ##################################

-L/usr/apr/lib is not right


######### /usr/apr/lib/amd64/pkgconfig/apr-1.pc ##### is correct

prefix=/usr/apr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib/amd64
APR_MAJOR_VERSION=1
includedir=${exec_prefix}/include

Name: APR
Description: The Apache Portable Runtime library
Version: 1.5.2
Libs: -L${libdir} -lapr-${APR_MAJOR_VERSION} -luuid -lsendfile -lsocket
-lnsl  -lpthread
Cflags: -DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I${includedir}
Jason Martin
2018-05-23 19:18:01 UTC
Permalink
In /usr/apr/lib/pkgconfig

mv apr-1.pc apr-1_32.pc

Works!

-L/usr/apr/lib/amd64 -lapr-1 -luuid -lsendfile -lsocket -lnsl -lpthread


Some kind of pkg-config nested search bug???
Jason Martin
2018-05-23 23:18:13 UTC
Permalink
Sorry, just tired and sick

I had link to 32 bit in /usr/lib/amd64/pkgconfig from days ago
Post by Jason Martin
In /usr/apr/lib/pkgconfig
mv apr-1.pc apr-1_32.pc
Works!
-L/usr/apr/lib/amd64 -lapr-1 -luuid -lsendfile -lsocket -lnsl -lpthread
Some kind of pkg-config nested search bug???
Loading...