I am trying to build squid-3.HEAD on Fedora 13 but i am getting the
following compilation errors.
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H - I../..../../include -I../../lib -I../../src -I../../include
-I../../libltdl -Wall -Wpointer-arith -Wwrite-strings -Wcomments
-Werror -pipe -D_REENTRANT -g -O2 -std=c++0x -MT Acl.lo -MD -MP -MF
.deps/Acl.Tpo -c -o Acl.lo Acl.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../../include
-I../../lib -I../../src -I../../include -I../../libltdl -Wall
-Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT
-g -O2 -std=c++0x -MT Acl.lo -MD -MP -MF .deps/Acl.Tpo -c Acl.cc
-fPIC -DPIC -o .libs/Acl.o
In file included from ../../src/ProtoPort.h:12:0,
from Acl.cc:40:
/src/ssl/gadgets.h:57:1: error: variable or field 'TXT_DB_free_cpp'
declared void
../../src/ssl/gadgets.h:57:1: error: 'TXT_DB' was not declared in this scope
../../src/ssl/gadgets.h:57:1: error: 'a' was not declared in this scope
../../src/ssl/gadgets.h:58:21: error: 'TXT_DB' was not declared in this scope
../../src/ssl/gadgets.h:58:29: error: 'TXT_DB_free_cpp' was not
declared in this scope
../../src/ssl/gadgets.h:58:44: error: template argument 1 is invalid
../../src/ssl/gadgets.h:58:44: error: template argument 2 is invalid
../../src/ssl/gadgets.h:58:60: error: invalid type in declaration
before ';' token
Openssl and openssl-devel are already installed and with latest versions
Gcc(g++) version = 4.4.5
OpenSSL version = 1.0.0d-1.fc13.i686
Any suggestions?
Got the same problem on voyage/Debian. Somewhere I have read you should try an older version.
Related
I'm new to the Firefox building, when I use clang++ (version 10.0.0) to compile the Firefox (./mach build), I met the following error:
In file included from /../Firefox/xpcom/glue/MemUtils.cpp:13:
In file included from /../Firefox/obj-x86_64-pc-linux-gnu/dist/system_wrappers/sys/mman.h:3:
.mozbuild/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/sys/mman.h:29:17: error: 'long type-name' is invalid
typedef __off_t off_t;
^
/home/yzhai003/Firefox/Firefox-HexType/obj-x86_64-pc-linux-gnu/mozilla-config.h:208:15: note: expanded from macro 'off_t'
#define off_t long
^
In file included from /../Firefox/xpcom/glue/MemUtils.cpp:13:
In file included from /../Firefox/obj-x86_64-pc-linux-gnu/dist/system_wrappers/sys/mman.h:3:
/../.mozbuild/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/sys/mman.h:37:18: error: cannot combine with previous 'type-name' declaration specifier
typedef __mode_t mode_t;
^
/../Firefox/obj-x86_64-pc-linux-gnu/mozilla-config.h:207:16: note: expanded from macro 'mode_t'
#define mode_t int
^
2 errors generated.
The problematic command looks like:
clang++ --sysroot /../.mozbuild/sysroot-x86_64-linux-gnu -std=gnu++17 -o MemUtils.o -c -I/../Firefox/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /../Firefox/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DXPCOM_GLUE -I/../Firefox/xpcom/glue/standalone -I/../Firefox/obj-x86_64-pc-linux-gnu/xpcom/glue/standalone -I/../Firefox/xpcom/build -I/../Firefox/xpcom/threads -I/../Firefox/obj-x86_64-pc-linux-gnu/dist/include -I/../Firefox/obj-x86_64-pc-linux-gnu/dist/include/nspr -I/../Firefox/obj-x86_64-pc-linux-gnu/dist/include/nss -DMOZILLA_CLIENT -include /../Firefox/obj-x86_64-pc-linux-gnu/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wenum-compare-conditional -Wno-ambiguous-reversed-operator -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-enum-float-conversion -Wno-error=deprecated-this-capture -Wno-error=deprecated-volatile -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wthread-safety -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fPIC -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -lstdc++ -gdwarf-4 -O2 -fno-omit-frame-pointer -funwind-tables -I/../.mozbuild/sysroot-x86_64-linux-gnu/usr/include/glib-2.0 -I/../.mozbuild/sysroot-x86_64-linux-gnu/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/../.mozbuild/sysroot-x86_64-linux-gnu/usr/include -fexperimental-new-pass-manager -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/MemUtils.o.pp /../Firefox/xpcom/glue/MemUtils.cpp
Anyone has hint to fix this problem?
I want to build DRAMPower for GEM5 and it gives error when i run the command "make -j4"
Downloaded DRAMPower.zip and then after unzipping it running the make command
The Error which is get is:
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/TraceParser.d -iquote src -o src/TraceParser.o
-c src/TraceParser.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wall -Werror -g -std=c++0x
-MMD -MF src/CmdScheduler.d -iquote src -o src/CmdScheduler.o -c
src/CmdScheduler.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/cli/drampower.d -iquote src -o
src/cli/drampower.o -c src/cli/drampower.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/libdrampower/LibDRAMPower.d -iquote src -o
src/libdrampower/LibDRAMPower.o -c src/libdrampower/LibDRAMPower.cc
In file included from src/CommandAnalysis.h:55:0, from
src/TraceParser.h:46,
from src/TraceParser.cc:37:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
In file included from src/CommandAnalysis.h:55:0,
from src/libdrampower/LibDRAMPower.h:48,
from src/libdrampower/LibDRAMPower.cc:42:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/libdrampower/LibDRAMPower.o'
failed
make: *** [src/libdrampower/LibDRAMPower.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/cli/drampower.o' failed
make: *** [src/cli/drampower.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/TraceParser.o' failed
make: *** [src/TraceParser.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:102: recipe for target 'src/CmdScheduler.o' failed
make: *** [src/CmdScheduler.o] Error 1
Is there any way to get a list of files clang created for my source file? I have a very complex and long command line call for clang (actually from Xcode), and I would like to know which files get created besides temporary object files:
(FYI: I had to shorten the call due to SO)
clang++ -x c++
-arch
x86_64
-fmessage-length=0
-fdiagnostics-show-note-include-stack
-fmacro-backtrace-limit=0
-std=gnu++14
-stdlib=libc++
-fmodules
-gmodules
-fmodules-cache-path=/Users/Daniel/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
-fmodules-prune-interval=86400
-fmodules-prune-after=345600
-fbuild-session-file=/Users/Daniel/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation
-fmodules-validate-once-per-build-session
-Wnon-modular-include-in-framework-module
-Werror=non-modular-include-in-framework-module
-Wno-trigraphs
-fpascal-strings
-O0
-DDEBUG=1
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
-fasm-blocks
-fstrict-aliasing
-Wdeprecated-declarations
-Winvalid-offsetof
-mmacosx-version-min=10.14
-g
-fvisibility-inlines-hidden
-Wno-sign-conversion
-index-store-path
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Index/DataStore
-iquote
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/afds-generated-files.hmap
-I/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/afds-own-target-headers.hmap
-I/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/afds-all-target-headers.hmap
-iquote
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/afds-project-headers.hmap
-I/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Products/Debug/include
-I/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/DerivedSources/x86_64
-I/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/DerivedSources
-F/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Products/Debug
-MMD
-MT
dependencies
-MF
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/Objects-normal/x86_64/main.d
--serialize-diagnostics
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/Objects-normal/x86_64/main.dia
-c
/Users/Daniel/Desktop/afds/afds/main.cpp
-o
/Users/Daniel/Library/Developer/Xcode/DerivedData/afds-a7sdf68ads76f8asd7f6/Build/Intermediates.noindex/afds.build/Debug/afds.build/Objects-normal/x86_64/main.o
I am trying to add -std=c++0x into the eclipse Ubuntu but I do not know how to add it.
My original set up:
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/copy2.d" -MT"src/copy2.d" -o "src/copy2.o" "../src/copy2.cpp"
Does not include -std=c++0x that's why giving me the error when I run std::stoi:
error: stoi is not a member of std
My expectation:
g++ -std=c++0x -O0 -g3 -Wall -c -fmessage-length=0 MMD -MP -MF"src/copy2.d" -MT"src/copy2.d" -o "src/copy2.o" "../src/copy2.cpp"
I've just tried to debug my C++ program after upgrading to Ubuntu 11.10 and it appears the gdb version I'm running (7.3) is broken for debug output.
What happens:
I hit debug, Console window pops up, Message appears at the top:
warning: GDB: failed to set controlling terminal: Operation not permitted
I get no output from std::cout calls, even just a
std::cout << "hi" << std::endl;
Anyone able to help? I tried to google the subject and came up with a lot of similar issues, but not ones related to this particular symptom, and how to fix it. I've made sure I have the latest version of GDB, etc.
Addendum: I am using Code::Blocks as my ide.
A rebuild of my project with full commandline output gives:
-------------- Clean: Debug in DungeonCrawlerCPP ---------------
Cleaned "DungeonCrawlerCPP - Debug"
-------------- Build: Debug in DungeonCrawlerCPP ---------------
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/main.cpp -o obj/Debug/main.o
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/ActionableObject.cpp -o obj/Debug/src/ActionableObject.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/ActionableObject.cpp:1:9: warning: #pragma once in main file [enabled by default]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/AppSettings.cpp -o obj/Debug/src/AppSettings.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/AppSettings.cpp:1:9: warning: #pragma once in main file [enabled by default]
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/AppSettings.cpp: In member function ‘void AppSettings::load(const char*)’:
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/AppSettings.cpp:98:23: warning: statement has no effect [-Wunused-value]
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/AppSettings.cpp:114:29: warning: statement has no effect [-Wunused-value]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Container.cpp -o obj/Debug/src/Container.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Container.cpp:1:9: warning: #pragma once in main file [enabled by default]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Entity.cpp -o obj/Debug/src/Entity.o
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Item.cpp -o obj/Debug/src/Item.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Item.cpp:1:9: warning: #pragma once in main file [enabled by default]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Monster.cpp -o obj/Debug/src/Monster.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Monster.cpp:1:9: warning: #pragma once in main file [enabled by default]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Player.cpp -o obj/Debug/src/Player.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Player.cpp: In member function ‘void Player::attackMonster(std::string)’:
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Player.cpp:36:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/Room.cpp -o obj/Debug/src/Room.o
/home/reedja/CPPProjects/DungeonCrawlerCPP/src/Room.cpp:1:9: warning: #pragma once in main file [enabled by default]
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/tinystr.cpp -o obj/Debug/src/tinystr.o
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/tinyxml.cpp -o obj/Debug/src/tinyxml.o
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/tinyxmlerror.cpp -o obj/Debug/src/tinyxmlerror.o
g++ -Wall -fexceptions -g -fpermissive -std=gnu++0x -Iinclude -c /home/reedja/CPPProjects/DungeonCrawlerCPP/src/tinyxmlparser.cpp -o obj/Debug/src/tinyxmlparser.o
g++ -o bin/Debug/DungeonCrawlerCPP obj/Debug/main.o obj/Debug/src/ActionableObject.o obj/Debug/src/AppSettings.o obj/Debug/src/Container.o obj/Debug/src/Entity.o obj/Debug/src/Item.o obj/Debug/src/Monster.o obj/Debug/src/Player.o obj/Debug/src/Room.o obj/Debug/src/tinystr.o obj/Debug/src/tinyxml.o obj/Debug/src/tinyxmlerror.o obj/Debug/src/tinyxmlparser.o
Output size is 674.11 KB
Process terminated with status 0 (0 minutes, 6 seconds)
0 errors, 9 warnings
If that helps?...
I found the answer - for some reason C::B doesn't set global -g as default, so I had no debugging symbols. I still get the weird error message, but at least I now get console output :)