Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #524] Sun Studio / Solaris: helloworld.o: unknown file type #254

Closed
icinga-migration opened this issue Jun 21, 2010 · 11 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/524

Created by alexs77 on 2010-06-21 18:25:48 +00:00

Assignee: Tommi
Status: Resolved (closed on 2012-04-04 16:55:05 +00:00)
Target Version: 1.7
Last Update: 2012-04-04 16:55:05 +00:00 (in Redmine)


/opt/local/ccache/bin/ccache /opt/sunstudio12.1/bin/cc  -xO5 -xdepend=yes -xmemalign=8s -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -fsingle -xalias_level=basic -xchip=sparc64vii -xcache=64/64/2:5120/256/10 -xarch=sparcima -xipo=1 -I/opt/csw/include -I/opt/local/libdbi/include -DHAVE_CONFIG_H -o helloworld.o helloworld.c -G -L/opt/csw/lib -L/opt/local/libdbi/lib/ -lrt -lsocket
"helloworld.c", line 38: warning: syntax error:  empty declaration
ld: fatal: file helloworld.o: unknown file type
ld: fatal: File processing errors. No output written to helloworld.o
*** Error code 1
make: Fatal error: Command failed for target `helloworld.o'
Current working directory /export/home/user/Source/icinga-core/module
*** Error code 1
make: Fatal error: Command failed for target `all'

While checking things because of issue #520 & issue #521 , I remembered to check my patch for nagios 3.2.0 and saw, that I had also the problem with Nagios 3.2.0.

Fix (for icinga-core git) attached.

Attachments

Changesets

2011-03-16 08:37:53 +00:00 by mfriedrich 0972d81

install: use *.so instead of *.o for solaris, patch in contrib/solaris/ #524

fixes #524

2012-02-24 17:27:21 +00:00 by mfriedrich d2366ac

install: change idomod extension from .o to .so, make .so the default extension for modules #2354

refs #2354
refs #524
refs #2346

2012-04-26 12:38:17 +00:00 by mfriedrich fb2a14e

warn users after make install-init about idomod changes

refs #2558
refs #524
refs #2346

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-21 20:50:56 +00:00

hmmm i wouldn't rename such things that way. i do understand that solaris is tricky and organizes things a bit different than the rest of the world, but changing *.o into a binary executable (intended) file might break everything else.

did you saw those tips using gcc and gmake?
http://www.nagios-portal.org/wbb/index.php?page=Thread&postID=104488#post104488

I think the best thing would be a section the docs adding all known issues for Icinga on Solaris which cannot be resolved by simply patching things out.

I am not that familiar on how to detect sun solaris during configure, but we might set a conditiional flags and then adding those patches which are different to linux&co.

@icinga-migration
Copy link
Author

Updated by alexs77 on 2010-06-23 09:20:27 +00:00

  • File added icinga-core.helloworld_idomod-so.patch

Turns out, that .so works fine on Solaris. Patch attached, fixes also issue #526

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-25 07:59:42 +00:00

hmm if we change that, it will be a major upgrade. this means removing the old idomod.o references on existing systems, or at least pointing the users within upgrade docs to that.

also, it must be replaced in icinga.cfg:event_broker=...

i'd like to postpone that for 1.0.3 in august, the solaris fixes can be pushed into a special release before that, if not done until monday.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-09-17 14:57:18 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

would be running into a fixed 1.2 after release probably. dunno if there is time for core and modules.

@icinga-migration
Copy link
Author

Updated by alexs77 on 2010-10-25 11:56:19 +00:00

FWIW, as mentioned in #521, this still fails in icinga 1.2.1:

[…]
/opt/solstudio12.2/bin/cc -xO5 -xdepend=yes -xmemalign=8s -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -fsingle -xalias_level=basic -xchip=sparc64vii -xcache=64/64/2:5120/256/10 -xarch=sparcima -xipo=1 -I/opt/local/gd/include -I/opt/local/libdbi/include -DHAVE_CONFIG_H -DNSCGI -L/opt/local/gd/lib -L/opt/local/libdbi/lib -o histogram.cgi histogram.c ../base/statsprofiler.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o ../common/snprintf.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd  -lpng -ljpeg -lz -lm -lrt -lnsl -lsocket
histogram.c:
"../include/logging.h", line 68: warning:  attribute "__format__" is unknown, ignored
"../include/logging.h", line 70: warning:  attribute "__format__" is unknown, ignored
../base/statsprofiler.c:
cd ./html && make
if [ xyes = xyes ]; then \
        cd ./module && make; \
fi
/opt/solstudio12.2/bin/cc  -xO5 -xdepend=yes -xmemalign=8s -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -fsingle -xalias_level=basic -xchip=sparc64vii -xcache=64/64/2:5120/256/10 -xarch=sparcima -xipo=1 -I/opt/local/gd/include -I/opt/local/libdbi/include -DHAVE_CONFIG_H -o helloworld.o helloworld.c -G -L/opt/local/gd/lib -L/opt/local/libdbi/lib -lrt -lnsl -lsocket
"helloworld.c", line 38: warning: syntax error:  empty declaration
ld: fatal: file helloworld.o: unknown file type
ld: fatal: File processing errors. No output written to helloworld.o
*** Error code 2
make: Fatal error: Command failed for target `helloworld.o'
Current working directory /export/home/user/Source/icinga/icinga-1.2.1/module
*** Error code 1
make: Fatal error: Command failed for target `all'

But when I use icinga-core.helloworld_idomod-so.patch patch, I can compile it just fine.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-01-10 17:04:35 +00:00

  • Status changed from Assigned to Feedback
  • Priority changed from Normal to Low
  • Done % changed from 0 to 50

i'd take the patch into contrib if you prefer that, but you'd still have to apply that manually. changing a well known / long grown name simple as it is will break many things.
such thing can only be introduced when writing a new bit of software.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-03-14 22:17:43 +00:00

  • Status changed from Feedback to Assigned
  • Target Version set to 1.4

i'll add that patch to contrib and then resolve this issue.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-03-16 11:35:32 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 50 to 100

Applied in changeset 0972d81.

@icinga-migration
Copy link
Author

Updated by Tommi on 2011-05-17 14:20:12 +00:00

  • Status changed from Resolved to Assigned
  • Done % changed from 100 to 90

looks not finally solved when using Sunwspro 11 (cc)

cc  -m64 -I/home/adbm/tools10/include -I/home/adbm/tools10/include -DOCI_IMPORT_RUNTIME -DOCI_CHARSET_ANSI  -D_REENTRANT -m64 -xarch=generic64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV  -I/home/adbm/tools10/lib/perl5/5.10.1/sun4-solaris-thread-multi-64/CORE  -I/home/adbm/tools10/include/openssl -I/home/adbm/tools10/include -DHAVE_CONFIG_H -o helloworld.so helloworld.c -G -m64 -L/home/adbm/tools10/lib -L/home/adbm/tools10/lib -lrt -lnsl -lsocket  -lssl -lcrypto
cc: Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit programs
cc: Warning: a -xcode value producing position independent code should be specified when producing dynamic objects by passing -G to the linker.
"helloworld.c", line 38: warning: syntax error:  empty declaration
ld: fatal: relocation error: R_SPARC_H44: file helloworld.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object

Solution: add -KPIC flag when cc is used
BTW: use -m64 in CFLAGS and LDFLAGS instead of using -xarch for current cc versions

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2011-05-23 16:27:49 +00:00

  • Assigned to changed from mfriedrich to Tommi
  • Target Version deleted 1.4

passing m64 happens to be a configure issue then, or how you'd export that for using cc. the provided patch only makes the .so possible instead of .o so i consider this being tested and resolved. if you're experiencing another issue like mentioned, feel free to update the git diff/patch yourself and re-add to contrib.

@icinga-migration
Copy link
Author

Updated by Tommi on 2012-04-04 16:55:05 +00:00

  • Status changed from Assigned to Resolved
  • Target Version set to 1.7

fixed with #2354

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant