Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7683 Discussions

Failure when using profile guided optimizations on OSX

meldaproduction
Beginner
171 Views

 

 For the I tried to use profile guided optimizations and after about an hour of compiling (it's a big project), this is what I got:
0  0x10da73b51  __assert_rtn + 144
1  0x10dad99fb  ld::tool::OutputFile::addressOf(ld::Internal const&, ld::Fixup const*, ld::Atom const**) + 155
2  0x10dadafaf  ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 1663
3  0x10dae03a5  ld::tool::OutputFile::writeAtoms(ld::Internal&, unsigned char*) + 495
4  0x10dad8e4f  ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 779
5  0x10dad3551  ld::tool::OutputFile::write(ld::Internal&) + 149
6  0x10da7481a  main + 1028
A linker snapshot was created at:
/tmp/libMeldaProductionAudioPluginKernel.dylib-2015-03-15-174847.ld-snapshot
ld: Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /SourceCache/ld64/ld64-241.9/src/ld/ld.hpp, line 731.

For the record, on Windows it works, but the build for generating profile guided database doesn't work 100%, but in most cases it does...

0 Kudos
2 Replies
Brandon_H_Intel
Employee
171 Views

Hello meldaproduction,

I can't reproduce using -prof-gen and -prof-use with the vec_samples with 15.0 initial product on OS X. I did some googling of that linker assertion, but nothing jumped out at me as being particularly useful. I have a couple questions which should help reproduce and/or identify the problem:

1. What version of OS X* and Xcode* are you using?

2. What specific version of the Intel(R) C++ Compiler are you using? (Adding -V to the compiler command line should give this information)

3. What compiler and linker options are you using when you get the linker crash?

meldaproduction
Beginner
171 Views

Thanks. I'm using newest OSX, newest XCode and newest ICC. Here are the command lines:

Compiler:

export PATH=/opt/intel/composer_xe_2015.2.132/bin/ia32:/DATA/Programming/MLibrary/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
icpc -fno-rtti -arch i386 -restrict -msse2 -fPIC -shared -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include -I/opt/intel/composer_xe_2015/ipp/include -I/opt/intel/composer_xe_2015/ipp/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include -I/opt/intel/composer_xe_2015.2.132/compiler/include -I. -c -fexceptions -fvisibility=hidden -fpascal-strings -fasm-blocks -stdlib=libstdc++ -mfpmath=sse -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-non-virtual-dtor -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wno-switch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wshorten-64-to-32 -Wno-newline-eof -Wno-deprecated-declarations -Winvalid-offsetof -Wno-conversion -Wno-sign-conversion -Wno-comment -Wno-tautological-compare -Wno-constant-logical-operand -Wno-deprecated-writable-strings -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-#pragma-messages -fp-model fast=1 -fno-stack-security-check -std=c++11 -O2 -ipo -ansi-alias -ftz -axAVX -opt-report0 -vec-report0 -prof-gen -prof-dir /DATA/PROFGEN/MeldaProductionAudioPluginKernel -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.5 main.cpp -o !temp/main.o

Linker:

export PATH=/opt/intel/composer_xe_2015.2.132/bin/ia32:/DATA/Programming/MLibrary/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
icpc -static-intel -arch i386 main.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.5 -shared -dynamiclib -read_only_relocs suppress  -L/opt/intel/composer_xe_2015/ipp/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib -lmlibraryasm -ldl -lpthread -lfreetype -lzlib -llibpng -llibjpeg -lbzip2 -llibflac -lvstsdk3 -laax -lCoreAudioUtils -llibmad -lipps -lippvm -lippcore -lippi -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib -L/opt/intel/composer_xe_2015.2.132/compiler/lib -framework Carbon -framework Cocoa -framework AudioUnit -framework CoreAudio -framework CoreMIDI -framework CoreServices -framework AudioToolbox -framework IOKit -framework Security -framework OpenGL -framework AGL -Xlinker -headerpad -Xlinker 578 -Wl,-no_compact_unwind -fdata-sections -o libMeldaProductionAudioPluginKernel.dylib

 

Reply